Show More
@@ -1,2130 +1,2000 b'' | |||||
1 | # -*- coding: iso-8859-1 -*- |
|
1 | # -*- coding: iso-8859-1 -*- | |
2 |
|
2 | |||
3 | """ |
|
3 | """ | |
4 | ``ipipe`` provides classes to be used in an interactive Python session. Doing a |
|
4 | ``ipipe`` provides classes to be used in an interactive Python session. Doing a | |
5 | ``from ipipe import *`` is the preferred way to do this. The name of all |
|
5 | ``from ipipe import *`` is the preferred way to do this. The name of all | |
6 | objects imported this way starts with ``i`` to minimize collisions. |
|
6 | objects imported this way starts with ``i`` to minimize collisions. | |
7 |
|
7 | |||
8 | ``ipipe`` supports "pipeline expressions", which is something resembling Unix |
|
8 | ``ipipe`` supports "pipeline expressions", which is something resembling Unix | |
9 | pipes. An example is: |
|
9 | pipes. An example is: | |
10 |
|
10 | |||
11 | >>> ienv | isort("key.lower()") |
|
11 | >>> ienv | isort("key.lower()") | |
12 |
|
12 | |||
13 | This gives a listing of all environment variables sorted by name. |
|
13 | This gives a listing of all environment variables sorted by name. | |
14 |
|
14 | |||
15 |
|
15 | |||
16 | There are three types of objects in a pipeline expression: |
|
16 | There are three types of objects in a pipeline expression: | |
17 |
|
17 | |||
18 | * ``Table``s: These objects produce items. Examples are ``ls`` (listing the |
|
18 | * ``Table``s: These objects produce items. Examples are ``ls`` (listing the | |
19 | current directory, ``ienv`` (listing environment variables), ``ipwd`` (listing |
|
19 | current directory, ``ienv`` (listing environment variables), ``ipwd`` (listing | |
20 | user account) and ``igrp`` (listing user groups). A ``Table`` must be the |
|
20 | user account) and ``igrp`` (listing user groups). A ``Table`` must be the | |
21 | first object in a pipe expression. |
|
21 | first object in a pipe expression. | |
22 |
|
22 | |||
23 | * ``Pipe``s: These objects sit in the middle of a pipe expression. They |
|
23 | * ``Pipe``s: These objects sit in the middle of a pipe expression. They | |
24 | transform the input in some way (e.g. filtering or sorting it). Examples are: |
|
24 | transform the input in some way (e.g. filtering or sorting it). Examples are: | |
25 | ``ifilter`` (which filters the input pipe), ``isort`` (which sorts the input |
|
25 | ``ifilter`` (which filters the input pipe), ``isort`` (which sorts the input | |
26 | pipe) and ``ieval`` (which evaluates a function or expression for each object |
|
26 | pipe) and ``ieval`` (which evaluates a function or expression for each object | |
27 | in the input pipe). |
|
27 | in the input pipe). | |
28 |
|
28 | |||
29 | * ``Display``s: These objects can be put as the last object in a pipeline |
|
29 | * ``Display``s: These objects can be put as the last object in a pipeline | |
30 | expression. There are responsible for displaying the result of the pipeline |
|
30 | expression. There are responsible for displaying the result of the pipeline | |
31 | expression. If a pipeline expression doesn't end in a display object a default |
|
31 | expression. If a pipeline expression doesn't end in a display object a default | |
32 | display objects will be used. One example is ``browse`` which is a ``curses`` |
|
32 | display objects will be used. One example is ``browse`` which is a ``curses`` | |
33 | based browser. |
|
33 | based browser. | |
34 |
|
34 | |||
35 |
|
35 | |||
36 | Adding support for pipeline expressions to your own objects can be done through |
|
36 | Adding support for pipeline expressions to your own objects can be done through | |
37 | three extensions points (all of them optional): |
|
37 | three extensions points (all of them optional): | |
38 |
|
38 | |||
39 | * An object that will be displayed as a row by a ``Display`` object should |
|
39 | * An object that will be displayed as a row by a ``Display`` object should | |
40 | implement the method ``__xattrs__(self, mode)``. This method must return a |
|
40 | implement the method ``__xattrs__(self, mode)``. This method must return a | |
41 | sequence of attribute names. This sequence may also contain integers, which |
|
41 | sequence of attribute names. This sequence may also contain integers, which | |
42 | will be treated as sequence indizes. Also supported is ``None``, which uses |
|
42 | will be treated as sequence indizes. Also supported is ``None``, which uses | |
43 | the object itself and callables which will be called with the object as the |
|
43 | the object itself and callables which will be called with the object as the | |
44 | an argument. If ``__xattrs__()`` isn't implemented ``(None,)`` will be used as |
|
44 | an argument. If ``__xattrs__()`` isn't implemented ``(None,)`` will be used as | |
45 | the attribute sequence (i.e. the object itself (it's ``repr()`` format) will |
|
45 | the attribute sequence (i.e. the object itself (it's ``repr()`` format) will | |
46 | be being displayed. The global function ``xattrs()`` implements this |
|
46 | be being displayed. The global function ``xattrs()`` implements this | |
47 | functionality. |
|
47 | functionality. | |
48 |
|
48 | |||
49 | * When an object ``foo`` is displayed in the header, footer or table cell of the |
|
49 | * When an object ``foo`` is displayed in the header, footer or table cell of the | |
50 | browser ``foo.__xrepr__(mode)`` is called. Mode can be ``"header"`` or |
|
50 | browser ``foo.__xrepr__(mode)`` is called. Mode can be ``"header"`` or | |
51 | ``"footer"`` for the header or footer line and ``"cell"`` for a table cell. |
|
51 | ``"footer"`` for the header or footer line and ``"cell"`` for a table cell. | |
52 | ``__xrepr__()```must return an iterable (e.g. by being a generator) which |
|
52 | ``__xrepr__()```must return an iterable (e.g. by being a generator) which | |
53 | produces the following items: The first item should be a tuple containing |
|
53 | produces the following items: The first item should be a tuple containing | |
54 | the alignment (-1 left aligned, 0 centered and 1 right aligned) and whether |
|
54 | the alignment (-1 left aligned, 0 centered and 1 right aligned) and whether | |
55 | the complete output must be displayed or if the browser is allowed to stop |
|
55 | the complete output must be displayed or if the browser is allowed to stop | |
56 | output after enough text has been produced (e.g. a syntax highlighted text |
|
56 | output after enough text has been produced (e.g. a syntax highlighted text | |
57 | line would use ``True``, but for a large data structure (i.e. a nested list, |
|
57 | line would use ``True``, but for a large data structure (i.e. a nested list, | |
58 | tuple or dictionary) ``False`` would be used). The other output ``__xrepr__()`` |
|
58 | tuple or dictionary) ``False`` would be used). The other output ``__xrepr__()`` | |
59 | may produce is tuples of ``Style```objects and text (which contain the text |
|
59 | may produce is tuples of ``Style```objects and text (which contain the text | |
60 | representation of the object; see the ``astyle`` module). If ``__xrepr__()`` |
|
60 | representation of the object; see the ``astyle`` module). If ``__xrepr__()`` | |
61 | recursively outputs a data structure the function ``xrepr(object, mode)`` can |
|
61 | recursively outputs a data structure the function ``xrepr(object, mode)`` can | |
62 | be used and ``"default"`` must be passed as the mode in these calls. This in |
|
62 | be used and ``"default"`` must be passed as the mode in these calls. This in | |
63 | turn calls the ``__xrepr__()`` method on ``object`` (or uses ``repr(object)`` |
|
63 | turn calls the ``__xrepr__()`` method on ``object`` (or uses ``repr(object)`` | |
64 | as the string representation if ``__xrepr__()`` doesn't exist). |
|
64 | as the string representation if ``__xrepr__()`` doesn't exist). | |
65 |
|
65 | |||
66 | * Objects that can be iterated by ``Pipe``s must implement the method |
|
66 | * Objects that can be iterated by ``Pipe``s must implement the method | |
67 | ``__xiter__(self, mode)``. ``mode`` can take the following values: |
|
67 | ``__xiter__(self, mode)``. ``mode`` can take the following values: | |
68 |
|
68 | |||
69 | - ``"default"``: This is the default value and ist always used by pipeline |
|
69 | - ``"default"``: This is the default value and ist always used by pipeline | |
70 | expressions. Other values are only used in the browser. |
|
70 | expressions. Other values are only used in the browser. | |
71 | - ``None``: This value is passed by the browser. The object must return an |
|
71 | - ``None``: This value is passed by the browser. The object must return an | |
72 | iterable of ``XMode`` objects describing all modes supported by the object. |
|
72 | iterable of ``XMode`` objects describing all modes supported by the object. | |
73 | (This should never include ``"default"`` or ``None``). |
|
73 | (This should never include ``"default"`` or ``None``). | |
74 | - Any other value that the object supports. |
|
74 | - Any other value that the object supports. | |
75 |
|
75 | |||
76 | The global function ``xiter()`` can be called to get such an iterator. If |
|
76 | The global function ``xiter()`` can be called to get such an iterator. If | |
77 | the method ``_xiter__`` isn't implemented, ``xiter()`` falls back to |
|
77 | the method ``_xiter__`` isn't implemented, ``xiter()`` falls back to | |
78 | ``__iter__``. In addition to that, dictionaries and modules receive special |
|
78 | ``__iter__``. In addition to that, dictionaries and modules receive special | |
79 | treatment (returning an iterator over ``(key, value)`` pairs). This makes it |
|
79 | treatment (returning an iterator over ``(key, value)`` pairs). This makes it | |
80 | possible to use dictionaries and modules in pipeline expressions, for example: |
|
80 | possible to use dictionaries and modules in pipeline expressions, for example: | |
81 |
|
81 | |||
82 | >>> import sys |
|
82 | >>> import sys | |
83 | >>> sys | ifilter("isinstance(value, int)") | idump |
|
83 | >>> sys | ifilter("isinstance(value, int)") | idump | |
84 | key |value |
|
84 | key |value | |
85 | api_version| 1012 |
|
85 | api_version| 1012 | |
86 | dllhandle | 503316480 |
|
86 | dllhandle | 503316480 | |
87 | hexversion | 33817328 |
|
87 | hexversion | 33817328 | |
88 | maxint |2147483647 |
|
88 | maxint |2147483647 | |
89 | maxunicode | 65535 |
|
89 | maxunicode | 65535 | |
90 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") |
|
90 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") | |
91 | ... |
|
91 | ... | |
92 |
|
92 | |||
93 | Note: The expression strings passed to ``ifilter()`` and ``isort()`` can |
|
93 | Note: The expression strings passed to ``ifilter()`` and ``isort()`` can | |
94 | refer to the object to be filtered or sorted via the variable ``_`` and to any |
|
94 | refer to the object to be filtered or sorted via the variable ``_`` and to any | |
95 | of the attributes of the object, i.e.: |
|
95 | of the attributes of the object, i.e.: | |
96 |
|
96 | |||
97 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") |
|
97 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") | |
98 |
|
98 | |||
99 | does the same as |
|
99 | does the same as | |
100 |
|
100 | |||
101 | >>> sys.modules | ifilter("value is not None") | isort("key.lower()") |
|
101 | >>> sys.modules | ifilter("value is not None") | isort("key.lower()") | |
102 |
|
102 | |||
103 | In addition to expression strings, it's possible to pass callables (taking |
|
103 | In addition to expression strings, it's possible to pass callables (taking | |
104 | the object as an argument) to ``ifilter()``, ``isort()`` and ``ieval()``: |
|
104 | the object as an argument) to ``ifilter()``, ``isort()`` and ``ieval()``: | |
105 |
|
105 | |||
106 | >>> sys | ifilter(lambda _:isinstance(_.value, int)) \ |
|
106 | >>> sys | ifilter(lambda _:isinstance(_.value, int)) \ | |
107 | ... | ieval(lambda _: (_.key, hex(_.value))) | idump |
|
107 | ... | ieval(lambda _: (_.key, hex(_.value))) | idump | |
108 | 0 |1 |
|
108 | 0 |1 | |
109 | api_version|0x3f4 |
|
109 | api_version|0x3f4 | |
110 | dllhandle |0x1e000000 |
|
110 | dllhandle |0x1e000000 | |
111 | hexversion |0x20402f0 |
|
111 | hexversion |0x20402f0 | |
112 | maxint |0x7fffffff |
|
112 | maxint |0x7fffffff | |
113 | maxunicode |0xffff |
|
113 | maxunicode |0xffff | |
114 | """ |
|
114 | """ | |
115 |
|
115 | |||
116 | import sys, os, os.path, stat, glob, new, csv, datetime, types |
|
116 | import sys, os, os.path, stat, glob, new, csv, datetime, types | |
117 | import itertools, mimetypes |
|
117 | import itertools, mimetypes | |
118 |
|
118 | |||
119 | try: # Python 2.3 compatibility |
|
119 | try: # Python 2.3 compatibility | |
120 | import collections |
|
120 | import collections | |
121 | except ImportError: |
|
121 | except ImportError: | |
122 | deque = list |
|
122 | deque = list | |
123 | else: |
|
123 | else: | |
124 | deque = collections.deque |
|
124 | deque = collections.deque | |
125 |
|
125 | |||
126 | try: # Python 2.3 compatibility |
|
126 | try: # Python 2.3 compatibility | |
127 | set |
|
127 | set | |
128 | except NameError: |
|
128 | except NameError: | |
129 | import sets |
|
129 | import sets | |
130 | set = sets.Set |
|
130 | set = sets.Set | |
131 |
|
131 | |||
132 | try: # Python 2.3 compatibility |
|
132 | try: # Python 2.3 compatibility | |
133 | sorted |
|
133 | sorted | |
134 | except NameError: |
|
134 | except NameError: | |
135 | def sorted(iterator, key=None, reverse=False): |
|
135 | def sorted(iterator, key=None, reverse=False): | |
136 | items = list(iterator) |
|
136 | items = list(iterator) | |
137 | if key is not None: |
|
137 | if key is not None: | |
138 | items.sort(lambda i1, i2: cmp(key(i1), key(i2))) |
|
138 | items.sort(lambda i1, i2: cmp(key(i1), key(i2))) | |
139 | else: |
|
139 | else: | |
140 | items.sort() |
|
140 | items.sort() | |
141 | if reverse: |
|
141 | if reverse: | |
142 | items.reverse() |
|
142 | items.reverse() | |
143 | return items |
|
143 | return items | |
144 |
|
144 | |||
145 | try: |
|
145 | try: | |
146 | import pwd |
|
146 | import pwd | |
147 | except ImportError: |
|
147 | except ImportError: | |
148 | pwd = None |
|
148 | pwd = None | |
149 |
|
149 | |||
150 | try: |
|
150 | try: | |
151 | import grp |
|
151 | import grp | |
152 | except ImportError: |
|
152 | except ImportError: | |
153 | grp = None |
|
153 | grp = None | |
154 |
|
154 | |||
155 | import path |
|
155 | import path | |
156 | try: |
|
156 | try: | |
157 | from IPython import genutils, ipapi |
|
157 | from IPython import genutils, ipapi | |
158 | except ImportError: |
|
158 | except ImportError: | |
159 | genutils = None |
|
159 | genutils = None | |
160 | ipapi = None |
|
160 | ipapi = None | |
161 |
|
161 | |||
162 | import astyle |
|
162 | import astyle | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | __all__ = [ |
|
165 | __all__ = [ | |
166 | "ifile", "ils", "iglob", "iwalk", "ipwdentry", "ipwd", "igrpentry", "igrp", |
|
166 | "ifile", "ils", "iglob", "iwalk", "ipwdentry", "ipwd", "igrpentry", "igrp", | |
167 | "icsv", "ix", "ichain", "isort", "ifilter", "ieval", "ienum", "ienv", |
|
167 | "icsv", "ix", "ichain", "isort", "ifilter", "ieval", "ienum", "ienv", | |
168 | "idump", "iless" |
|
168 | "idump", "iless" | |
169 | ] |
|
169 | ] | |
170 |
|
170 | |||
171 |
|
171 | |||
172 | os.stat_float_times(True) # enable microseconds |
|
172 | os.stat_float_times(True) # enable microseconds | |
173 |
|
173 | |||
174 |
|
174 | |||
175 | class AttrNamespace(object): |
|
175 | class AttrNamespace(object): | |
176 | """ |
|
176 | """ | |
177 | Helper class that is used for providing a namespace for evaluating |
|
177 | Helper class that is used for providing a namespace for evaluating | |
178 | expressions containing attribute names of an object. |
|
178 | expressions containing attribute names of an object. | |
179 | """ |
|
179 | """ | |
180 | def __init__(self, wrapped): |
|
180 | def __init__(self, wrapped): | |
181 | self.wrapped = wrapped |
|
181 | self.wrapped = wrapped | |
182 |
|
182 | |||
183 | def __getitem__(self, name): |
|
183 | def __getitem__(self, name): | |
184 | if name == "_": |
|
184 | if name == "_": | |
185 | return self.wrapped |
|
185 | return self.wrapped | |
186 | try: |
|
186 | try: | |
187 | return getattr(self.wrapped, name) |
|
187 | return getattr(self.wrapped, name) | |
188 | except AttributeError: |
|
188 | except AttributeError: | |
189 | raise KeyError(name) |
|
189 | raise KeyError(name) | |
190 |
|
190 | |||
191 | # Python 2.3 compatibility |
|
191 | # Python 2.3 compatibility | |
192 | # use eval workaround to find out which names are used in the |
|
192 | # use eval workaround to find out which names are used in the | |
193 | # eval string and put them into the locals. This works for most |
|
193 | # eval string and put them into the locals. This works for most | |
194 | # normal uses case, bizarre ones like accessing the locals() |
|
194 | # normal uses case, bizarre ones like accessing the locals() | |
195 | # will fail |
|
195 | # will fail | |
196 | try: |
|
196 | try: | |
197 | eval("_", None, AttrNamespace(None)) |
|
197 | eval("_", None, AttrNamespace(None)) | |
198 | except TypeError: |
|
198 | except TypeError: | |
199 | real_eval = eval |
|
199 | real_eval = eval | |
200 | def eval(codestring, _globals, _locals): |
|
200 | def eval(codestring, _globals, _locals): | |
201 | """ |
|
201 | """ | |
202 | eval(source[, globals[, locals]]) -> value |
|
202 | eval(source[, globals[, locals]]) -> value | |
203 |
|
203 | |||
204 | Evaluate the source in the context of globals and locals. |
|
204 | Evaluate the source in the context of globals and locals. | |
205 | The source may be a string representing a Python expression |
|
205 | The source may be a string representing a Python expression | |
206 | or a code object as returned by compile(). |
|
206 | or a code object as returned by compile(). | |
207 | The globals must be a dictionary and locals can be any mappping. |
|
207 | The globals must be a dictionary and locals can be any mappping. | |
208 |
|
208 | |||
209 | This function is a workaround for the shortcomings of |
|
209 | This function is a workaround for the shortcomings of | |
210 | Python 2.3's eval. |
|
210 | Python 2.3's eval. | |
211 | """ |
|
211 | """ | |
212 |
|
212 | |||
213 | if isinstance(codestring, basestring): |
|
213 | if isinstance(codestring, basestring): | |
214 | code = compile(codestring, "_eval", "eval") |
|
214 | code = compile(codestring, "_eval", "eval") | |
215 | else: |
|
215 | else: | |
216 | code = codestring |
|
216 | code = codestring | |
217 | newlocals = {} |
|
217 | newlocals = {} | |
218 | for name in code.co_names: |
|
218 | for name in code.co_names: | |
219 | try: |
|
219 | try: | |
220 | newlocals[name] = _locals[name] |
|
220 | newlocals[name] = _locals[name] | |
221 | except KeyError: |
|
221 | except KeyError: | |
222 | pass |
|
222 | pass | |
223 | return real_eval(code, _globals, newlocals) |
|
223 | return real_eval(code, _globals, newlocals) | |
224 |
|
224 | |||
225 |
|
225 | |||
226 | noitem = object() |
|
226 | noitem = object() | |
227 |
|
227 | |||
228 | def item(iterator, index, default=noitem): |
|
228 | def item(iterator, index, default=noitem): | |
229 | """ |
|
229 | """ | |
230 | Return the ``index``th item from the iterator ``iterator``. |
|
230 | Return the ``index``th item from the iterator ``iterator``. | |
231 | ``index`` must be an integer (negative integers are relative to the |
|
231 | ``index`` must be an integer (negative integers are relative to the | |
232 | end (i.e. the last item produced by the iterator)). |
|
232 | end (i.e. the last item produced by the iterator)). | |
233 |
|
233 | |||
234 | If ``default`` is given, this will be the default value when |
|
234 | If ``default`` is given, this will be the default value when | |
235 | the iterator doesn't contain an item at this position. Otherwise an |
|
235 | the iterator doesn't contain an item at this position. Otherwise an | |
236 | ``IndexError`` will be raised. |
|
236 | ``IndexError`` will be raised. | |
237 |
|
237 | |||
238 | Note that using this function will partially or totally exhaust the |
|
238 | Note that using this function will partially or totally exhaust the | |
239 | iterator. |
|
239 | iterator. | |
240 | """ |
|
240 | """ | |
241 | i = index |
|
241 | i = index | |
242 | if i>=0: |
|
242 | if i>=0: | |
243 | for item in iterator: |
|
243 | for item in iterator: | |
244 | if not i: |
|
244 | if not i: | |
245 | return item |
|
245 | return item | |
246 | i -= 1 |
|
246 | i -= 1 | |
247 | else: |
|
247 | else: | |
248 | i = -index |
|
248 | i = -index | |
249 | cache = deque() |
|
249 | cache = deque() | |
250 | for item in iterator: |
|
250 | for item in iterator: | |
251 | cache.append(item) |
|
251 | cache.append(item) | |
252 | if len(cache)>i: |
|
252 | if len(cache)>i: | |
253 | cache.popleft() |
|
253 | cache.popleft() | |
254 | if len(cache)==i: |
|
254 | if len(cache)==i: | |
255 | return cache.popleft() |
|
255 | return cache.popleft() | |
256 | if default is noitem: |
|
256 | if default is noitem: | |
257 | raise IndexError(index) |
|
257 | raise IndexError(index) | |
258 | else: |
|
258 | else: | |
259 | return default |
|
259 | return default | |
260 |
|
260 | |||
261 |
|
261 | |||
262 | def getglobals(g): |
|
262 | def getglobals(g): | |
263 | if g is None: |
|
263 | if g is None: | |
264 | if ipapi is not None: |
|
264 | if ipapi is not None: | |
265 | api = ipapi.get() |
|
265 | api = ipapi.get() | |
266 | if api is not None: |
|
266 | if api is not None: | |
267 | return api.user_ns |
|
267 | return api.user_ns | |
268 | return globals() |
|
268 | return globals() | |
269 | return g |
|
269 | return g | |
270 |
|
270 | |||
271 |
|
271 | |||
272 | class Descriptor(object): |
|
272 | class Descriptor(object): | |
273 | def __hash__(self): |
|
273 | def __hash__(self): | |
274 | return hash(self.__class__) ^ hash(self.key()) |
|
274 | return hash(self.__class__) ^ hash(self.key()) | |
275 |
|
275 | |||
276 | def __eq__(self, other): |
|
276 | def __eq__(self, other): | |
277 | return self.__class__ is other.__class__ and self.key() == other.key() |
|
277 | return self.__class__ is other.__class__ and self.key() == other.key() | |
278 |
|
278 | |||
279 | def __ne__(self, other): |
|
279 | def __ne__(self, other): | |
280 | return self.__class__ is not other.__class__ or self.key() != other.key() |
|
280 | return self.__class__ is not other.__class__ or self.key() != other.key() | |
281 |
|
281 | |||
282 | def key(self): |
|
282 | def key(self): | |
283 | pass |
|
283 | pass | |
284 |
|
284 | |||
285 | def name(self): |
|
285 | def name(self): | |
286 | key = self.key() |
|
286 | key = self.key() | |
287 | if key is None: |
|
287 | if key is None: | |
288 | return "_" |
|
288 | return "_" | |
289 | return str(key) |
|
289 | return str(key) | |
290 |
|
290 | |||
291 | def attrtype(self, obj): |
|
291 | def attrtype(self, obj): | |
292 | pass |
|
292 | pass | |
293 |
|
293 | |||
294 | def valuetype(self, obj): |
|
294 | def valuetype(self, obj): | |
295 | pass |
|
295 | pass | |
296 |
|
296 | |||
297 | def value(self, obj): |
|
297 | def value(self, obj): | |
298 | pass |
|
298 | pass | |
299 |
|
299 | |||
300 | def doc(self, obj): |
|
300 | def doc(self, obj): | |
301 | pass |
|
301 | pass | |
302 |
|
302 | |||
303 | def shortdoc(self, obj): |
|
303 | def shortdoc(self, obj): | |
304 | doc = self.doc(obj) |
|
304 | doc = self.doc(obj) | |
305 | if doc is not None: |
|
305 | if doc is not None: | |
306 | doc = doc.strip().splitlines()[0].strip() |
|
306 | doc = doc.strip().splitlines()[0].strip() | |
307 | return doc |
|
307 | return doc | |
308 |
|
308 | |||
309 | def iter(self, obj): |
|
309 | def iter(self, obj): | |
310 | return xiter(self.value(obj)) |
|
310 | return xiter(self.value(obj)) | |
311 |
|
311 | |||
312 |
|
312 | |||
313 | class SelfDescriptor(Descriptor): |
|
313 | class SelfDescriptor(Descriptor): | |
314 | def key(self): |
|
314 | def key(self): | |
315 | return None |
|
315 | return None | |
316 |
|
316 | |||
317 | def attrtype(self, obj): |
|
317 | def attrtype(self, obj): | |
318 | return "self" |
|
318 | return "self" | |
319 |
|
319 | |||
320 | def valuetype(self, obj): |
|
320 | def valuetype(self, obj): | |
321 | return type(obj) |
|
321 | return type(obj) | |
322 |
|
322 | |||
323 | def value(self, obj): |
|
323 | def value(self, obj): | |
324 | return obj |
|
324 | return obj | |
325 |
|
325 | |||
326 | def __repr__(self): |
|
326 | def __repr__(self): | |
327 | return "Self" |
|
327 | return "Self" | |
328 |
|
328 | |||
329 | selfdescriptor = SelfDescriptor() # there's no need for more than one |
|
329 | selfdescriptor = SelfDescriptor() # there's no need for more than one | |
330 |
|
330 | |||
331 |
|
331 | |||
332 | class AttributeDescriptor(Descriptor): |
|
332 | class AttributeDescriptor(Descriptor): | |
333 | __slots__ = ("_name", "_doc") |
|
333 | __slots__ = ("_name", "_doc") | |
334 |
|
334 | |||
335 | def __init__(self, name, doc=None): |
|
335 | def __init__(self, name, doc=None): | |
336 | self._name = name |
|
336 | self._name = name | |
337 | self._doc = doc |
|
337 | self._doc = doc | |
338 |
|
338 | |||
339 | def key(self): |
|
339 | def key(self): | |
340 | return self._name |
|
340 | return self._name | |
341 |
|
341 | |||
342 | def doc(self, obj): |
|
342 | def doc(self, obj): | |
343 | return self._doc |
|
343 | return self._doc | |
344 |
|
344 | |||
345 | def attrtype(self, obj): |
|
345 | def attrtype(self, obj): | |
346 | return "attr" |
|
346 | return "attr" | |
347 |
|
347 | |||
348 | def valuetype(self, obj): |
|
348 | def valuetype(self, obj): | |
349 | return type(getattr(obj, self._name)) |
|
349 | return type(getattr(obj, self._name)) | |
350 |
|
350 | |||
351 | def value(self, obj): |
|
351 | def value(self, obj): | |
352 | return getattr(obj, self._name) |
|
352 | return getattr(obj, self._name) | |
353 |
|
353 | |||
354 | def __repr__(self): |
|
354 | def __repr__(self): | |
355 | if self._doc is None: |
|
355 | if self._doc is None: | |
356 | return "Attribute(%r)" % self._name |
|
356 | return "Attribute(%r)" % self._name | |
357 | else: |
|
357 | else: | |
358 | return "Attribute(%r, %r)" % (self._name, self._doc) |
|
358 | return "Attribute(%r, %r)" % (self._name, self._doc) | |
359 |
|
359 | |||
360 |
|
360 | |||
361 | class IndexDescriptor(Descriptor): |
|
361 | class IndexDescriptor(Descriptor): | |
362 | __slots__ = ("_index",) |
|
362 | __slots__ = ("_index",) | |
363 |
|
363 | |||
364 | def __init__(self, index): |
|
364 | def __init__(self, index): | |
365 | self._index = index |
|
365 | self._index = index | |
366 |
|
366 | |||
367 | def key(self): |
|
367 | def key(self): | |
368 | return self._index |
|
368 | return self._index | |
369 |
|
369 | |||
370 | def attrtype(self, obj): |
|
370 | def attrtype(self, obj): | |
371 | return "item" |
|
371 | return "item" | |
372 |
|
372 | |||
373 | def valuetype(self, obj): |
|
373 | def valuetype(self, obj): | |
374 | return type(obj[self._index]) |
|
374 | return type(obj[self._index]) | |
375 |
|
375 | |||
376 | def value(self, obj): |
|
376 | def value(self, obj): | |
377 | return obj[self._index] |
|
377 | return obj[self._index] | |
378 |
|
378 | |||
379 | def __repr__(self): |
|
379 | def __repr__(self): | |
380 | return "Index(%r)" % self._index |
|
380 | return "Index(%r)" % self._index | |
381 |
|
381 | |||
382 |
|
382 | |||
383 | class MethodDescriptor(Descriptor): |
|
383 | class MethodDescriptor(Descriptor): | |
384 | __slots__ = ("_name", "_doc") |
|
384 | __slots__ = ("_name", "_doc") | |
385 |
|
385 | |||
386 | def __init__(self, name, doc=None): |
|
386 | def __init__(self, name, doc=None): | |
387 | self._name = name |
|
387 | self._name = name | |
388 | self._doc = doc |
|
388 | self._doc = doc | |
389 |
|
389 | |||
390 | def key(self): |
|
390 | def key(self): | |
391 | return self._name |
|
391 | return self._name | |
392 |
|
392 | |||
393 | def doc(self, obj): |
|
393 | def doc(self, obj): | |
394 | if self._doc is None: |
|
394 | if self._doc is None: | |
395 | return getattr(obj, self._name).__doc__ |
|
395 | return getattr(obj, self._name).__doc__ | |
396 | return self._doc |
|
396 | return self._doc | |
397 |
|
397 | |||
398 | def attrtype(self, obj): |
|
398 | def attrtype(self, obj): | |
399 | return "method" |
|
399 | return "method" | |
400 |
|
400 | |||
401 | def valuetype(self, obj): |
|
401 | def valuetype(self, obj): | |
402 | return type(self.value(obj)) |
|
402 | return type(self.value(obj)) | |
403 |
|
403 | |||
404 | def value(self, obj): |
|
404 | def value(self, obj): | |
405 | return getattr(obj, self._name)() |
|
405 | return getattr(obj, self._name)() | |
406 |
|
406 | |||
407 | def __repr__(self): |
|
407 | def __repr__(self): | |
408 | if self._doc is None: |
|
408 | if self._doc is None: | |
409 | return "Method(%r)" % self._name |
|
409 | return "Method(%r)" % self._name | |
410 | else: |
|
410 | else: | |
411 | return "Method(%r, %r)" % (self._name, self._doc) |
|
411 | return "Method(%r, %r)" % (self._name, self._doc) | |
412 |
|
412 | |||
413 |
|
413 | |||
414 | class IterAttributeDescriptor(Descriptor): |
|
414 | class IterAttributeDescriptor(Descriptor): | |
415 | __slots__ = ("_name", "_doc") |
|
415 | __slots__ = ("_name", "_doc") | |
416 |
|
416 | |||
417 | def __init__(self, name, doc=None): |
|
417 | def __init__(self, name, doc=None): | |
418 | self._name = name |
|
418 | self._name = name | |
419 | self._doc = doc |
|
419 | self._doc = doc | |
420 |
|
420 | |||
421 | def key(self): |
|
421 | def key(self): | |
422 | return self._name |
|
422 | return self._name | |
423 |
|
423 | |||
424 | def doc(self, obj): |
|
424 | def doc(self, obj): | |
425 | return self._doc |
|
425 | return self._doc | |
426 |
|
426 | |||
427 | def attrtype(self, obj): |
|
427 | def attrtype(self, obj): | |
428 | return "iter" |
|
428 | return "iter" | |
429 |
|
429 | |||
430 | def valuetype(self, obj): |
|
430 | def valuetype(self, obj): | |
431 | return noitem |
|
431 | return noitem | |
432 |
|
432 | |||
433 | def value(self, obj): |
|
433 | def value(self, obj): | |
434 | return noitem |
|
434 | return noitem | |
435 |
|
435 | |||
436 | def iter(self, obj): |
|
436 | def iter(self, obj): | |
437 | return xiter(getattr(obj, self._name)) |
|
437 | return xiter(getattr(obj, self._name)) | |
438 |
|
438 | |||
439 | def __repr__(self): |
|
439 | def __repr__(self): | |
440 | if self._doc is None: |
|
440 | if self._doc is None: | |
441 | return "IterAttribute(%r)" % self._name |
|
441 | return "IterAttribute(%r)" % self._name | |
442 | else: |
|
442 | else: | |
443 | return "IterAttribute(%r, %r)" % (self._name, self._doc) |
|
443 | return "IterAttribute(%r, %r)" % (self._name, self._doc) | |
444 |
|
444 | |||
445 |
|
445 | |||
446 | class IterMethodDescriptor(Descriptor): |
|
446 | class IterMethodDescriptor(Descriptor): | |
447 | __slots__ = ("_name", "_doc") |
|
447 | __slots__ = ("_name", "_doc") | |
448 |
|
448 | |||
449 | def __init__(self, name, doc=None): |
|
449 | def __init__(self, name, doc=None): | |
450 | self._name = name |
|
450 | self._name = name | |
451 | self._doc = doc |
|
451 | self._doc = doc | |
452 |
|
452 | |||
453 | def key(self): |
|
453 | def key(self): | |
454 | return self._name |
|
454 | return self._name | |
455 |
|
455 | |||
456 | def doc(self, obj): |
|
456 | def doc(self, obj): | |
457 | if self._doc is None: |
|
457 | if self._doc is None: | |
458 | return getattr(obj, self._name).__doc__ |
|
458 | return getattr(obj, self._name).__doc__ | |
459 | return self._doc |
|
459 | return self._doc | |
460 |
|
460 | |||
461 | def attrtype(self, obj): |
|
461 | def attrtype(self, obj): | |
462 | return "itermethod" |
|
462 | return "itermethod" | |
463 |
|
463 | |||
464 | def valuetype(self, obj): |
|
464 | def valuetype(self, obj): | |
465 | return noitem |
|
465 | return noitem | |
466 |
|
466 | |||
467 | def value(self, obj): |
|
467 | def value(self, obj): | |
468 | return noitem |
|
468 | return noitem | |
469 |
|
469 | |||
470 | def iter(self, obj): |
|
470 | def iter(self, obj): | |
471 | return xiter(getattr(obj, self._name)()) |
|
471 | return xiter(getattr(obj, self._name)()) | |
472 |
|
472 | |||
473 | def __repr__(self): |
|
473 | def __repr__(self): | |
474 | if self._doc is None: |
|
474 | if self._doc is None: | |
475 | return "IterMethod(%r)" % self._name |
|
475 | return "IterMethod(%r)" % self._name | |
476 | else: |
|
476 | else: | |
477 | return "IterMethod(%r, %r)" % (self._name, self._doc) |
|
477 | return "IterMethod(%r, %r)" % (self._name, self._doc) | |
478 |
|
478 | |||
479 |
|
479 | |||
480 | class FunctionDescriptor(Descriptor): |
|
480 | class FunctionDescriptor(Descriptor): | |
481 | __slots__ = ("_function", "_name", "_doc") |
|
481 | __slots__ = ("_function", "_name", "_doc") | |
482 |
|
482 | |||
483 | def __init__(self, function, name=None, doc=None): |
|
483 | def __init__(self, function, name=None, doc=None): | |
484 | self._function = function |
|
484 | self._function = function | |
485 | self._name = name |
|
485 | self._name = name | |
486 | self._doc = doc |
|
486 | self._doc = doc | |
487 |
|
487 | |||
488 | def key(self): |
|
488 | def key(self): | |
489 | return self._function |
|
489 | return self._function | |
490 |
|
490 | |||
491 | def name(self): |
|
491 | def name(self): | |
492 | if self._name is not None: |
|
492 | if self._name is not None: | |
493 | return self._name |
|
493 | return self._name | |
494 | return getattr(self._function, "__xname__", self._function.__name__) |
|
494 | return getattr(self._function, "__xname__", self._function.__name__) | |
495 |
|
495 | |||
496 | def doc(self, obj): |
|
496 | def doc(self, obj): | |
497 | if self._doc is None: |
|
497 | if self._doc is None: | |
498 | return self._function.__doc__ |
|
498 | return self._function.__doc__ | |
499 | return self._doc |
|
499 | return self._doc | |
500 |
|
500 | |||
501 | def attrtype(self, obj): |
|
501 | def attrtype(self, obj): | |
502 | return "function" |
|
502 | return "function" | |
503 |
|
503 | |||
504 | def valuetype(self, obj): |
|
504 | def valuetype(self, obj): | |
505 | return type(self._function(obj)) |
|
505 | return type(self._function(obj)) | |
506 |
|
506 | |||
507 | def value(self, obj): |
|
507 | def value(self, obj): | |
508 | return self._function(obj) |
|
508 | return self._function(obj) | |
509 |
|
509 | |||
510 | def __repr__(self): |
|
510 | def __repr__(self): | |
511 | if self._doc is None: |
|
511 | if self._doc is None: | |
512 | return "Function(%r)" % self._name |
|
512 | return "Function(%r)" % self._name | |
513 | else: |
|
513 | else: | |
514 | return "Function(%r, %r)" % (self._name, self._doc) |
|
514 | return "Function(%r, %r)" % (self._name, self._doc) | |
515 |
|
515 | |||
516 |
|
516 | |||
517 | class Table(object): |
|
517 | class Table(object): | |
518 | """ |
|
518 | """ | |
519 | A ``Table`` is an object that produces items (just like a normal Python |
|
519 | A ``Table`` is an object that produces items (just like a normal Python | |
520 | iterator/generator does) and can be used as the first object in a pipeline |
|
520 | iterator/generator does) and can be used as the first object in a pipeline | |
521 | expression. The displayhook will open the default browser for such an object |
|
521 | expression. The displayhook will open the default browser for such an object | |
522 | (instead of simply printing the ``repr()`` result). |
|
522 | (instead of simply printing the ``repr()`` result). | |
523 | """ |
|
523 | """ | |
524 |
|
524 | |||
525 | # We want to support ``foo`` and ``foo()`` in pipeline expression: |
|
525 | # We want to support ``foo`` and ``foo()`` in pipeline expression: | |
526 | # So we implement the required operators (``|`` and ``+``) in the metaclass, |
|
526 | # So we implement the required operators (``|`` and ``+``) in the metaclass, | |
527 | # instantiate the class and forward the operator to the instance |
|
527 | # instantiate the class and forward the operator to the instance | |
528 | class __metaclass__(type): |
|
528 | class __metaclass__(type): | |
529 | def __iter__(self): |
|
529 | def __iter__(self): | |
530 | return iter(self()) |
|
530 | return iter(self()) | |
531 |
|
531 | |||
532 | def __or__(self, other): |
|
532 | def __or__(self, other): | |
533 | return self() | other |
|
533 | return self() | other | |
534 |
|
534 | |||
535 | def __add__(self, other): |
|
535 | def __add__(self, other): | |
536 | return self() + other |
|
536 | return self() + other | |
537 |
|
537 | |||
538 | def __radd__(self, other): |
|
538 | def __radd__(self, other): | |
539 | return other + self() |
|
539 | return other + self() | |
540 |
|
540 | |||
541 | def __getitem__(self, index): |
|
541 | def __getitem__(self, index): | |
542 | return self()[index] |
|
542 | return self()[index] | |
543 |
|
543 | |||
544 | def __getitem__(self, index): |
|
544 | def __getitem__(self, index): | |
545 | return item(self, index) |
|
545 | return item(self, index) | |
546 |
|
546 | |||
547 | def __contains__(self, item): |
|
547 | def __contains__(self, item): | |
548 | for haveitem in self: |
|
548 | for haveitem in self: | |
549 | if item == haveitem: |
|
549 | if item == haveitem: | |
550 | return True |
|
550 | return True | |
551 | return False |
|
551 | return False | |
552 |
|
552 | |||
553 | def __or__(self, other): |
|
553 | def __or__(self, other): | |
554 | # autoinstantiate right hand side |
|
554 | # autoinstantiate right hand side | |
555 | if isinstance(other, type) and issubclass(other, (Table, Display)): |
|
555 | if isinstance(other, type) and issubclass(other, (Table, Display)): | |
556 | other = other() |
|
556 | other = other() | |
557 | # treat simple strings and functions as ``ieval`` instances |
|
557 | # treat simple strings and functions as ``ieval`` instances | |
558 | elif not isinstance(other, Display) and not isinstance(other, Table): |
|
558 | elif not isinstance(other, Display) and not isinstance(other, Table): | |
559 | other = ieval(other) |
|
559 | other = ieval(other) | |
560 | # forward operations to the right hand side |
|
560 | # forward operations to the right hand side | |
561 | return other.__ror__(self) |
|
561 | return other.__ror__(self) | |
562 |
|
562 | |||
563 | def __add__(self, other): |
|
563 | def __add__(self, other): | |
564 | # autoinstantiate right hand side |
|
564 | # autoinstantiate right hand side | |
565 | if isinstance(other, type) and issubclass(other, Table): |
|
565 | if isinstance(other, type) and issubclass(other, Table): | |
566 | other = other() |
|
566 | other = other() | |
567 | return ichain(self, other) |
|
567 | return ichain(self, other) | |
568 |
|
568 | |||
569 | def __radd__(self, other): |
|
569 | def __radd__(self, other): | |
570 | # autoinstantiate left hand side |
|
570 | # autoinstantiate left hand side | |
571 | if isinstance(other, type) and issubclass(other, Table): |
|
571 | if isinstance(other, type) and issubclass(other, Table): | |
572 | other = other() |
|
572 | other = other() | |
573 | return ichain(other, self) |
|
573 | return ichain(other, self) | |
574 |
|
574 | |||
575 | def __iter__(self): |
|
575 | def __iter__(self): | |
576 | return xiter(self, "default") |
|
576 | return xiter(self, "default") | |
577 |
|
577 | |||
578 |
|
578 | |||
579 | class Pipe(Table): |
|
579 | class Pipe(Table): | |
580 | """ |
|
580 | """ | |
581 | A ``Pipe`` is an object that can be used in a pipeline expression. It |
|
581 | A ``Pipe`` is an object that can be used in a pipeline expression. It | |
582 | processes the objects it gets from its input ``Table``/``Pipe``. Note that |
|
582 | processes the objects it gets from its input ``Table``/``Pipe``. Note that | |
583 | a ``Pipe`` object can't be used as the first object in a pipeline |
|
583 | a ``Pipe`` object can't be used as the first object in a pipeline | |
584 | expression, as it doesn't produces items itself. |
|
584 | expression, as it doesn't produces items itself. | |
585 | """ |
|
585 | """ | |
586 | class __metaclass__(Table.__metaclass__): |
|
586 | class __metaclass__(Table.__metaclass__): | |
587 | def __ror__(self, input): |
|
587 | def __ror__(self, input): | |
588 | return input | self() |
|
588 | return input | self() | |
589 |
|
589 | |||
590 | def __ror__(self, input): |
|
590 | def __ror__(self, input): | |
591 | # autoinstantiate left hand side |
|
591 | # autoinstantiate left hand side | |
592 | if isinstance(input, type) and issubclass(input, Table): |
|
592 | if isinstance(input, type) and issubclass(input, Table): | |
593 | input = input() |
|
593 | input = input() | |
594 | self.input = input |
|
594 | self.input = input | |
595 | return self |
|
595 | return self | |
596 |
|
596 | |||
597 |
|
597 | |||
598 | def xrepr(item, mode="default"): |
|
598 | def xrepr(item, mode="default"): | |
599 | try: |
|
599 | try: | |
600 | func = item.__xrepr__ |
|
600 | func = item.__xrepr__ | |
601 | except AttributeError: |
|
601 | except AttributeError: | |
602 | pass |
|
602 | pass | |
603 | else: |
|
603 | else: | |
604 | try: |
|
604 | try: | |
605 | for x in func(mode): |
|
605 | for x in func(mode): | |
606 | yield x |
|
606 | yield x | |
607 | except (KeyboardInterrupt, SystemExit): |
|
607 | except (KeyboardInterrupt, SystemExit): | |
608 | raise |
|
608 | raise | |
609 | except Exception: |
|
609 | except Exception: | |
610 | yield (astyle.style_default, repr(item)) |
|
610 | yield (astyle.style_default, repr(item)) | |
611 | return |
|
611 | return | |
612 | if item is None: |
|
612 | if item is None: | |
613 | yield (astyle.style_type_none, repr(item)) |
|
613 | yield (astyle.style_type_none, repr(item)) | |
614 | elif isinstance(item, bool): |
|
614 | elif isinstance(item, bool): | |
615 | yield (astyle.style_type_bool, repr(item)) |
|
615 | yield (astyle.style_type_bool, repr(item)) | |
616 | elif isinstance(item, str): |
|
616 | elif isinstance(item, str): | |
617 | if mode == "cell": |
|
617 | if mode == "cell": | |
618 | yield (astyle.style_default, repr(item.expandtabs(tab))[1:-1]) |
|
618 | yield (astyle.style_default, repr(item.expandtabs(tab))[1:-1]) | |
619 | else: |
|
619 | else: | |
620 | yield (astyle.style_default, repr(item)) |
|
620 | yield (astyle.style_default, repr(item)) | |
621 | elif isinstance(item, unicode): |
|
621 | elif isinstance(item, unicode): | |
622 | if mode == "cell": |
|
622 | if mode == "cell": | |
623 | yield (astyle.style_default, repr(item.expandtabs(tab))[2:-1]) |
|
623 | yield (astyle.style_default, repr(item.expandtabs(tab))[2:-1]) | |
624 | else: |
|
624 | else: | |
625 | yield (astyle.style_default, repr(item)) |
|
625 | yield (astyle.style_default, repr(item)) | |
626 | elif isinstance(item, (int, long, float)): |
|
626 | elif isinstance(item, (int, long, float)): | |
627 | yield (1, True) |
|
627 | yield (1, True) | |
628 | yield (astyle.style_type_number, repr(item)) |
|
628 | yield (astyle.style_type_number, repr(item)) | |
629 | elif isinstance(item, complex): |
|
629 | elif isinstance(item, complex): | |
630 | yield (astyle.style_type_number, repr(item)) |
|
630 | yield (astyle.style_type_number, repr(item)) | |
631 | elif isinstance(item, datetime.datetime): |
|
631 | elif isinstance(item, datetime.datetime): | |
632 | if mode == "cell": |
|
632 | if mode == "cell": | |
633 | # Don't use strftime() here, as this requires year >= 1900 |
|
633 | # Don't use strftime() here, as this requires year >= 1900 | |
634 | yield (astyle.style_type_datetime, |
|
634 | yield (astyle.style_type_datetime, | |
635 | "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ |
|
635 | "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ | |
636 | (item.year, item.month, item.day, |
|
636 | (item.year, item.month, item.day, | |
637 | item.hour, item.minute, item.second, |
|
637 | item.hour, item.minute, item.second, | |
638 | item.microsecond), |
|
638 | item.microsecond), | |
639 | ) |
|
639 | ) | |
640 | else: |
|
640 | else: | |
641 | yield (astyle.style_type_datetime, repr(item)) |
|
641 | yield (astyle.style_type_datetime, repr(item)) | |
642 | elif isinstance(item, datetime.date): |
|
642 | elif isinstance(item, datetime.date): | |
643 | if mode == "cell": |
|
643 | if mode == "cell": | |
644 | yield (astyle.style_type_datetime, |
|
644 | yield (astyle.style_type_datetime, | |
645 | "%04d-%02d-%02d" % (item.year, item.month, item.day)) |
|
645 | "%04d-%02d-%02d" % (item.year, item.month, item.day)) | |
646 | else: |
|
646 | else: | |
647 | yield (astyle.style_type_datetime, repr(item)) |
|
647 | yield (astyle.style_type_datetime, repr(item)) | |
648 | elif isinstance(item, datetime.time): |
|
648 | elif isinstance(item, datetime.time): | |
649 | if mode == "cell": |
|
649 | if mode == "cell": | |
650 | yield (astyle.style_type_datetime, |
|
650 | yield (astyle.style_type_datetime, | |
651 | "%02d:%02d:%02d.%06d" % \ |
|
651 | "%02d:%02d:%02d.%06d" % \ | |
652 | (item.hour, item.minute, item.second, item.microsecond)) |
|
652 | (item.hour, item.minute, item.second, item.microsecond)) | |
653 | else: |
|
653 | else: | |
654 | yield (astyle.style_type_datetime, repr(item)) |
|
654 | yield (astyle.style_type_datetime, repr(item)) | |
655 | elif isinstance(item, datetime.timedelta): |
|
655 | elif isinstance(item, datetime.timedelta): | |
656 | yield (astyle.style_type_datetime, repr(item)) |
|
656 | yield (astyle.style_type_datetime, repr(item)) | |
657 | elif isinstance(item, type): |
|
657 | elif isinstance(item, type): | |
658 | if item.__module__ == "__builtin__": |
|
658 | if item.__module__ == "__builtin__": | |
659 | yield (astyle.style_type_type, item.__name__) |
|
659 | yield (astyle.style_type_type, item.__name__) | |
660 | else: |
|
660 | else: | |
661 | yield (astyle.style_type_type, "%s.%s" % (item.__module__, item.__name__)) |
|
661 | yield (astyle.style_type_type, "%s.%s" % (item.__module__, item.__name__)) | |
662 | elif isinstance(item, Exception): |
|
662 | elif isinstance(item, Exception): | |
663 | if item.__class__.__module__ == "exceptions": |
|
663 | if item.__class__.__module__ == "exceptions": | |
664 | classname = item.__class__.__name__ |
|
664 | classname = item.__class__.__name__ | |
665 | else: |
|
665 | else: | |
666 | classname = "%s.%s" % \ |
|
666 | classname = "%s.%s" % \ | |
667 | (item.__class__.__module__, item.__class__.__name__) |
|
667 | (item.__class__.__module__, item.__class__.__name__) | |
668 | if mode == "header" or mode == "footer": |
|
668 | if mode == "header" or mode == "footer": | |
669 | yield (astyle.style_error, "%s: %s" % (classname, item)) |
|
669 | yield (astyle.style_error, "%s: %s" % (classname, item)) | |
670 | else: |
|
670 | else: | |
671 | yield (astyle.style_error, classname) |
|
671 | yield (astyle.style_error, classname) | |
672 | elif isinstance(item, (list, tuple)): |
|
672 | elif isinstance(item, (list, tuple)): | |
673 | if mode == "header" or mode == "footer": |
|
673 | if mode == "header" or mode == "footer": | |
674 | if item.__class__.__module__ == "__builtin__": |
|
674 | if item.__class__.__module__ == "__builtin__": | |
675 | classname = item.__class__.__name__ |
|
675 | classname = item.__class__.__name__ | |
676 | else: |
|
676 | else: | |
677 | classname = "%s.%s" % \ |
|
677 | classname = "%s.%s" % \ | |
678 | (item.__class__.__module__,item.__class__.__name__) |
|
678 | (item.__class__.__module__,item.__class__.__name__) | |
679 | yield (astyle.style_default, |
|
679 | yield (astyle.style_default, | |
680 | "<%s object with %d items at 0x%x>" % \ |
|
680 | "<%s object with %d items at 0x%x>" % \ | |
681 | (classname, len(item), id(item))) |
|
681 | (classname, len(item), id(item))) | |
682 | else: |
|
682 | else: | |
683 | yield (-1, False) |
|
683 | yield (-1, False) | |
684 | if isinstance(item, list): |
|
684 | if isinstance(item, list): | |
685 | yield (astyle.style_default, "[") |
|
685 | yield (astyle.style_default, "[") | |
686 | end = "]" |
|
686 | end = "]" | |
687 | else: |
|
687 | else: | |
688 | yield (astyle.style_default, "(") |
|
688 | yield (astyle.style_default, "(") | |
689 | end = ")" |
|
689 | end = ")" | |
690 | for (i, subitem) in enumerate(item): |
|
690 | for (i, subitem) in enumerate(item): | |
691 | if i: |
|
691 | if i: | |
692 | yield (astyle.style_default, ", ") |
|
692 | yield (astyle.style_default, ", ") | |
693 | for part in xrepr(subitem, "default"): |
|
693 | for part in xrepr(subitem, "default"): | |
694 | yield part |
|
694 | yield part | |
695 | yield (astyle.style_default, end) |
|
695 | yield (astyle.style_default, end) | |
696 | elif isinstance(item, (dict, types.DictProxyType)): |
|
696 | elif isinstance(item, (dict, types.DictProxyType)): | |
697 | if mode == "header" or mode == "footer": |
|
697 | if mode == "header" or mode == "footer": | |
698 | if item.__class__.__module__ == "__builtin__": |
|
698 | if item.__class__.__module__ == "__builtin__": | |
699 | classname = item.__class__.__name__ |
|
699 | classname = item.__class__.__name__ | |
700 | else: |
|
700 | else: | |
701 | classname = "%s.%s" % \ |
|
701 | classname = "%s.%s" % \ | |
702 | (item.__class__.__module__,item.__class__.__name__) |
|
702 | (item.__class__.__module__,item.__class__.__name__) | |
703 | yield (astyle.style_default, |
|
703 | yield (astyle.style_default, | |
704 | "<%s object with %d items at 0x%x>" % \ |
|
704 | "<%s object with %d items at 0x%x>" % \ | |
705 | (classname, len(item), id(item))) |
|
705 | (classname, len(item), id(item))) | |
706 | else: |
|
706 | else: | |
707 | yield (-1, False) |
|
707 | yield (-1, False) | |
708 | if isinstance(item, dict): |
|
708 | if isinstance(item, dict): | |
709 | yield (astyle.style_default, "{") |
|
709 | yield (astyle.style_default, "{") | |
710 | end = "}" |
|
710 | end = "}" | |
711 | else: |
|
711 | else: | |
712 | yield (astyle.style_default, "dictproxy((") |
|
712 | yield (astyle.style_default, "dictproxy((") | |
713 | end = "})" |
|
713 | end = "})" | |
714 | for (i, (key, value)) in enumerate(item.iteritems()): |
|
714 | for (i, (key, value)) in enumerate(item.iteritems()): | |
715 | if i: |
|
715 | if i: | |
716 | yield (astyle.style_default, ", ") |
|
716 | yield (astyle.style_default, ", ") | |
717 | for part in xrepr(key, "default"): |
|
717 | for part in xrepr(key, "default"): | |
718 | yield part |
|
718 | yield part | |
719 | yield (astyle.style_default, ": ") |
|
719 | yield (astyle.style_default, ": ") | |
720 | for part in xrepr(value, "default"): |
|
720 | for part in xrepr(value, "default"): | |
721 | yield part |
|
721 | yield part | |
722 | yield (astyle.style_default, end) |
|
722 | yield (astyle.style_default, end) | |
723 | else: |
|
723 | else: | |
724 | yield (astyle.style_default, repr(item)) |
|
724 | yield (astyle.style_default, repr(item)) | |
725 |
|
725 | |||
726 |
|
726 | |||
727 | def upgradexattr(attr): |
|
727 | def upgradexattr(attr): | |
728 | if attr is None: |
|
728 | if attr is None: | |
729 | return selfdescriptor |
|
729 | return selfdescriptor | |
730 | elif isinstance(attr, Descriptor): |
|
730 | elif isinstance(attr, Descriptor): | |
731 | return attr |
|
731 | return attr | |
732 | elif isinstance(attr, str): |
|
732 | elif isinstance(attr, str): | |
733 | if attr.endswith("()"): |
|
733 | if attr.endswith("()"): | |
734 | if attr.startswith("-"): |
|
734 | if attr.startswith("-"): | |
735 | return IterMethodDescriptor(attr[1:-2]) |
|
735 | return IterMethodDescriptor(attr[1:-2]) | |
736 | else: |
|
736 | else: | |
737 | return MethodDescriptor(attr[:-2]) |
|
737 | return MethodDescriptor(attr[:-2]) | |
738 | else: |
|
738 | else: | |
739 | if attr.startswith("-"): |
|
739 | if attr.startswith("-"): | |
740 | return IterAttributeDescriptor(attr[1:]) |
|
740 | return IterAttributeDescriptor(attr[1:]) | |
741 | else: |
|
741 | else: | |
742 | return AttributeDescriptor(attr) |
|
742 | return AttributeDescriptor(attr) | |
743 | elif isinstance(attr, (int, long)): |
|
743 | elif isinstance(attr, (int, long)): | |
744 | return IndexDescriptor(attr) |
|
744 | return IndexDescriptor(attr) | |
745 | elif callable(attr): |
|
745 | elif callable(attr): | |
746 | return FunctionDescriptor(attr) |
|
746 | return FunctionDescriptor(attr) | |
747 | else: |
|
747 | else: | |
748 | raise TypeError("can't handle descriptor %r" % attr) |
|
748 | raise TypeError("can't handle descriptor %r" % attr) | |
749 |
|
749 | |||
750 |
|
750 | |||
751 | def xattrs(item, mode="default"): |
|
751 | def xattrs(item, mode="default"): | |
752 | try: |
|
752 | try: | |
753 | func = item.__xattrs__ |
|
753 | func = item.__xattrs__ | |
754 | except AttributeError: |
|
754 | except AttributeError: | |
755 | if mode == "detail": |
|
755 | if mode == "detail": | |
756 | for attrname in dir(item): |
|
756 | for attrname in dir(item): | |
757 | yield AttributeDescriptor(attrname) |
|
757 | yield AttributeDescriptor(attrname) | |
758 | else: |
|
758 | else: | |
759 | yield selfdescriptor |
|
759 | yield selfdescriptor | |
760 | else: |
|
760 | else: | |
761 | for attr in func(mode): |
|
761 | for attr in func(mode): | |
762 | yield upgradexattr(attr) |
|
762 | yield upgradexattr(attr) | |
763 |
|
763 | |||
764 |
|
764 | |||
765 | def _isdict(item): |
|
765 | def _isdict(item): | |
766 | try: |
|
766 | try: | |
767 | itermeth = item.__class__.__iter__ |
|
767 | itermeth = item.__class__.__iter__ | |
768 | except (AttributeError, TypeError): |
|
768 | except (AttributeError, TypeError): | |
769 | return False |
|
769 | return False | |
770 | return itermeth is dict.__iter__ or itermeth is types.DictProxyType.__iter__ |
|
770 | return itermeth is dict.__iter__ or itermeth is types.DictProxyType.__iter__ | |
771 |
|
771 | |||
772 |
|
772 | |||
773 | def _isstr(item): |
|
773 | def _isstr(item): | |
774 | if not isinstance(item, basestring): |
|
774 | if not isinstance(item, basestring): | |
775 | return False |
|
775 | return False | |
776 | try: |
|
776 | try: | |
777 | itermeth = item.__class__.__iter__ |
|
777 | itermeth = item.__class__.__iter__ | |
778 | except AttributeError: |
|
778 | except AttributeError: | |
779 | return True |
|
779 | return True | |
780 | return False # ``__iter__`` has been redefined |
|
780 | return False # ``__iter__`` has been redefined | |
781 |
|
781 | |||
782 |
|
782 | |||
783 | def xiter(item, mode="default"): |
|
783 | def xiter(item, mode="default"): | |
784 | try: |
|
784 | try: | |
785 | func = item.__xiter__ |
|
785 | func = item.__xiter__ | |
786 | except AttributeError: |
|
786 | except AttributeError: | |
787 | if _isdict(item): |
|
787 | if _isdict(item): | |
788 | def items(item): |
|
788 | def items(item): | |
789 | fields = ("key", "value") |
|
789 | fields = ("key", "value") | |
790 | for (key, value) in item.iteritems(): |
|
790 | for (key, value) in item.iteritems(): | |
791 | yield Fields(fields, key=key, value=value) |
|
791 | yield Fields(fields, key=key, value=value) | |
792 | return items(item) |
|
792 | return items(item) | |
793 | elif isinstance(item, new.module): |
|
793 | elif isinstance(item, new.module): | |
794 | def items(item): |
|
794 | def items(item): | |
795 | fields = ("key", "value") |
|
795 | fields = ("key", "value") | |
796 | for key in sorted(item.__dict__): |
|
796 | for key in sorted(item.__dict__): | |
797 | yield Fields(fields, key=key, value=getattr(item, key)) |
|
797 | yield Fields(fields, key=key, value=getattr(item, key)) | |
798 | return items(item) |
|
798 | return items(item) | |
799 | elif _isstr(item): |
|
799 | elif _isstr(item): | |
800 | if not item: |
|
800 | if not item: | |
801 | raise ValueError("can't enter empty string") |
|
801 | raise ValueError("can't enter empty string") | |
802 | lines = item.splitlines() |
|
802 | lines = item.splitlines() | |
803 | if len(lines) <= 1: |
|
803 | if len(lines) <= 1: | |
804 | raise ValueError("can't enter one line string") |
|
804 | raise ValueError("can't enter one line string") | |
805 | return iter(lines) |
|
805 | return iter(lines) | |
806 | return iter(item) |
|
806 | return iter(item) | |
807 | else: |
|
807 | else: | |
808 | return iter(func(mode)) # iter() just to be safe |
|
808 | return iter(func(mode)) # iter() just to be safe | |
809 |
|
809 | |||
810 |
|
810 | |||
811 | class ichain(Pipe): |
|
811 | class ichain(Pipe): | |
812 | """ |
|
812 | """ | |
813 | Chains multiple ``Table``s into one. |
|
813 | Chains multiple ``Table``s into one. | |
814 | """ |
|
814 | """ | |
815 |
|
815 | |||
816 | def __init__(self, *iters): |
|
816 | def __init__(self, *iters): | |
817 | self.iters = iters |
|
817 | self.iters = iters | |
818 |
|
818 | |||
819 | def __iter__(self): |
|
819 | def __iter__(self): | |
820 | return itertools.chain(*self.iters) |
|
820 | return itertools.chain(*self.iters) | |
821 |
|
821 | |||
822 | def __xrepr__(self, mode): |
|
822 | def __xrepr__(self, mode): | |
823 | if mode == "header" or mode == "footer": |
|
823 | if mode == "header" or mode == "footer": | |
824 | for (i, item) in enumerate(self.iters): |
|
824 | for (i, item) in enumerate(self.iters): | |
825 | if i: |
|
825 | if i: | |
826 | yield (astyle.style_default, "+") |
|
826 | yield (astyle.style_default, "+") | |
827 | if isinstance(item, Pipe): |
|
827 | if isinstance(item, Pipe): | |
828 | yield (astyle.style_default, "(") |
|
828 | yield (astyle.style_default, "(") | |
829 | for part in xrepr(item, mode): |
|
829 | for part in xrepr(item, mode): | |
830 | yield part |
|
830 | yield part | |
831 | if isinstance(item, Pipe): |
|
831 | if isinstance(item, Pipe): | |
832 | yield (astyle.style_default, ")") |
|
832 | yield (astyle.style_default, ")") | |
833 | else: |
|
833 | else: | |
834 | yield (astyle.style_default, repr(self)) |
|
834 | yield (astyle.style_default, repr(self)) | |
835 |
|
835 | |||
836 | def __repr__(self): |
|
836 | def __repr__(self): | |
837 | args = ", ".join([repr(it) for it in self.iters]) |
|
837 | args = ", ".join([repr(it) for it in self.iters]) | |
838 | return "%s.%s(%s)" % \ |
|
838 | return "%s.%s(%s)" % \ | |
839 | (self.__class__.__module__, self.__class__.__name__, args) |
|
839 | (self.__class__.__module__, self.__class__.__name__, args) | |
840 |
|
840 | |||
841 |
|
841 | |||
842 | class ifile(path.path): |
|
842 | class ifile(path.path): | |
843 | """ |
|
843 | """ | |
844 | file (or directory) object. |
|
844 | file (or directory) object. | |
845 | """ |
|
845 | """ | |
846 |
|
846 | |||
847 | def __add_(self, other): |
|
|||
848 | return ifile(path._base(self) + other) |
|
|||
849 |
|
||||
850 | def __radd_(self, other): |
|
|||
851 | return ifile(other + path._base(self)) |
|
|||
852 |
|
||||
853 | def __div_(self, other): |
|
|||
854 | return ifile(path.__div__(self, other)) |
|
|||
855 |
|
||||
856 | def getcwd(): |
|
|||
857 | return ifile(path.path.getcwd()) |
|
|||
858 | getcwd.__doc__ = path.path.getcwd.__doc__ |
|
|||
859 | getcwd = staticmethod(getcwd) |
|
|||
860 |
|
||||
861 | def abspath(self): |
|
|||
862 | return ifile(path.path.abspath(self)) |
|
|||
863 | abspath.__doc__ = path.path.abspath.__doc__ |
|
|||
864 |
|
||||
865 | def normcase(self): |
|
|||
866 | return ifile(path.path.normcase(self)) |
|
|||
867 | normcase.__doc__ = path.path.normcase.__doc__ |
|
|||
868 |
|
||||
869 | def normpath(self): |
|
|||
870 | return ifile(path.path.normpath(self)) |
|
|||
871 | normpath.__doc__ = path.path.normpath.__doc__ |
|
|||
872 |
|
||||
873 | def realpath(self): |
|
|||
874 | return ifile(path.path.realpath(self)) |
|
|||
875 | realpath.__doc__ = path.path.realpath.__doc__ |
|
|||
876 |
|
||||
877 | def expanduser(self): |
|
|||
878 | return ifile(path.path.expanduser(self)) |
|
|||
879 | expanduser.__doc__ = path.path.expanduser.__doc__ |
|
|||
880 |
|
||||
881 | def expandvars(self): |
|
|||
882 | return ifile(path.path.expandvars(self)) |
|
|||
883 | expandvars.__doc__ = path.path.expandvars.__doc__ |
|
|||
884 |
|
||||
885 | def dirname(self): |
|
|||
886 | return ifile(path.path.dirname(self)) |
|
|||
887 | dirname.__doc__ = path.path.dirname.__doc__ |
|
|||
888 |
|
||||
889 | parent = property(dirname, None, None, path.path.parent.__doc__) |
|
|||
890 |
|
||||
891 | def splitpath(self): |
|
|||
892 | (parent, child) = path.path.splitpath(self) |
|
|||
893 | return (ifile(parent), child) |
|
|||
894 | splitpath.__doc__ = path.path.splitpath.__doc__ |
|
|||
895 |
|
||||
896 | def splitdrive(self): |
|
|||
897 | (drive, rel) = path.path.splitdrive(self) |
|
|||
898 | return (ifile(drive), rel) |
|
|||
899 | splitdrive.__doc__ = path.path.splitdrive.__doc__ |
|
|||
900 |
|
||||
901 | def splitext(self): |
|
|||
902 | (filename, ext) = path.path.splitext(self) |
|
|||
903 | return (ifile(filename), ext) |
|
|||
904 | splitext.__doc__ = path.path.splitext.__doc__ |
|
|||
905 |
|
||||
906 | if hasattr(path.path, "splitunc"): |
|
|||
907 | def splitunc(self): |
|
|||
908 | (unc, rest) = path.path.splitunc(self) |
|
|||
909 | return (ifile(unc), rest) |
|
|||
910 | splitunc.__doc__ = path.path.splitunc.__doc__ |
|
|||
911 |
|
||||
912 | def _get_uncshare(self): |
|
|||
913 | unc, r = os.path.splitunc(self) |
|
|||
914 | return ifile(unc) |
|
|||
915 |
|
||||
916 | uncshare = property( |
|
|||
917 | _get_uncshare, None, None, |
|
|||
918 | """ The UNC mount point for this path. |
|
|||
919 | This is empty for paths on local drives. """) |
|
|||
920 |
|
||||
921 | def joinpath(self, *args): |
|
|||
922 | return ifile(path.path.joinpath(self, *args)) |
|
|||
923 | joinpath.__doc__ = path.path.joinpath.__doc__ |
|
|||
924 |
|
||||
925 | def splitall(self): |
|
|||
926 | return map(ifile, path.path.splitall(self)) |
|
|||
927 | splitall.__doc__ = path.path.splitall.__doc__ |
|
|||
928 |
|
||||
929 | def relpath(self): |
|
|||
930 | return ifile(path.path.relpath(self)) |
|
|||
931 | relpath.__doc__ = path.path.relpath.__doc__ |
|
|||
932 |
|
||||
933 | def relpathto(self, dest): |
|
|||
934 | return ifile(path.path.relpathto(self, dest)) |
|
|||
935 | relpathto.__doc__ = path.path.relpathto.__doc__ |
|
|||
936 |
|
||||
937 | def listdir(self, pattern=None): |
|
|||
938 | return [ifile(child) for child in path.path.listdir(self, pattern)] |
|
|||
939 | listdir.__doc__ = path.path.listdir.__doc__ |
|
|||
940 |
|
||||
941 | def dirs(self, pattern=None): |
|
|||
942 | return [ifile(child) for child in path.path.dirs(self, pattern)] |
|
|||
943 | dirs.__doc__ = path.path.dirs.__doc__ |
|
|||
944 |
|
||||
945 | def files(self, pattern=None): |
|
|||
946 | return [ifile(child) for child in path.path.files(self, pattern)] |
|
|||
947 | files.__doc__ = path.path.files.__doc__ |
|
|||
948 |
|
||||
949 | def walk(self, pattern=None): |
|
|||
950 | for child in path.path.walk(self, pattern): |
|
|||
951 | yield ifile(child) |
|
|||
952 | walk.__doc__ = path.path.walk.__doc__ |
|
|||
953 |
|
||||
954 | def walkdirs(self, pattern=None): |
|
|||
955 | for child in path.path.walkdirs(self, pattern): |
|
|||
956 | yield ifile(child) |
|
|||
957 | walkdirs.__doc__ = path.path.walkdirs.__doc__ |
|
|||
958 |
|
||||
959 | def walkfiles(self, pattern=None): |
|
|||
960 | for child in path.path.walkfiles(self, pattern): |
|
|||
961 | yield ifile(child) |
|
|||
962 | walkfiles.__doc__ = path.path.walkfiles.__doc__ |
|
|||
963 |
|
||||
964 | def glob(self, pattern): |
|
|||
965 | return map(ifile, path.path.glob(self, pattern)) |
|
|||
966 | glob.__doc__ = path.path.glob.__doc__ |
|
|||
967 |
|
||||
968 | if hasattr(os, 'readlink'): |
|
|||
969 | def readlink(self): |
|
|||
970 | return ifile(path.path.readlink(self)) |
|
|||
971 | readlink.__doc__ = path.path.readlink.__doc__ |
|
|||
972 |
|
||||
973 | def readlinkabs(self): |
|
|||
974 | return ifile(path.path.readlinkabs(self)) |
|
|||
975 | readlinkabs.__doc__ = path.path.readlinkabs.__doc__ |
|
|||
976 |
|
||||
977 | def getmode(self): |
|
847 | def getmode(self): | |
978 | return self.stat().st_mode |
|
848 | return self.stat().st_mode | |
979 | mode = property(getmode, None, None, "Access mode") |
|
849 | mode = property(getmode, None, None, "Access mode") | |
980 |
|
850 | |||
981 | def gettype(self): |
|
851 | def gettype(self): | |
982 | data = [ |
|
852 | data = [ | |
983 | (stat.S_ISREG, "file"), |
|
853 | (stat.S_ISREG, "file"), | |
984 | (stat.S_ISDIR, "dir"), |
|
854 | (stat.S_ISDIR, "dir"), | |
985 | (stat.S_ISCHR, "chardev"), |
|
855 | (stat.S_ISCHR, "chardev"), | |
986 | (stat.S_ISBLK, "blockdev"), |
|
856 | (stat.S_ISBLK, "blockdev"), | |
987 | (stat.S_ISFIFO, "fifo"), |
|
857 | (stat.S_ISFIFO, "fifo"), | |
988 | (stat.S_ISLNK, "symlink"), |
|
858 | (stat.S_ISLNK, "symlink"), | |
989 | (stat.S_ISSOCK,"socket"), |
|
859 | (stat.S_ISSOCK,"socket"), | |
990 | ] |
|
860 | ] | |
991 | lstat = self.lstat() |
|
861 | lstat = self.lstat() | |
992 | if lstat is not None: |
|
862 | if lstat is not None: | |
993 | types = set([text for (func, text) in data if func(lstat.st_mode)]) |
|
863 | types = set([text for (func, text) in data if func(lstat.st_mode)]) | |
994 | else: |
|
864 | else: | |
995 | types = set() |
|
865 | types = set() | |
996 | m = self.mode |
|
866 | m = self.mode | |
997 | types.update([text for (func, text) in data if func(m)]) |
|
867 | types.update([text for (func, text) in data if func(m)]) | |
998 | return ", ".join(types) |
|
868 | return ", ".join(types) | |
999 | type = property(gettype, None, None, "file type (file, directory, link, etc.)") |
|
869 | type = property(gettype, None, None, "file type (file, directory, link, etc.)") | |
1000 |
|
870 | |||
1001 | def getmodestr(self): |
|
871 | def getmodestr(self): | |
1002 | m = self.mode |
|
872 | m = self.mode | |
1003 | data = [ |
|
873 | data = [ | |
1004 | (stat.S_IRUSR, "-r"), |
|
874 | (stat.S_IRUSR, "-r"), | |
1005 | (stat.S_IWUSR, "-w"), |
|
875 | (stat.S_IWUSR, "-w"), | |
1006 | (stat.S_IXUSR, "-x"), |
|
876 | (stat.S_IXUSR, "-x"), | |
1007 | (stat.S_IRGRP, "-r"), |
|
877 | (stat.S_IRGRP, "-r"), | |
1008 | (stat.S_IWGRP, "-w"), |
|
878 | (stat.S_IWGRP, "-w"), | |
1009 | (stat.S_IXGRP, "-x"), |
|
879 | (stat.S_IXGRP, "-x"), | |
1010 | (stat.S_IROTH, "-r"), |
|
880 | (stat.S_IROTH, "-r"), | |
1011 | (stat.S_IWOTH, "-w"), |
|
881 | (stat.S_IWOTH, "-w"), | |
1012 | (stat.S_IXOTH, "-x"), |
|
882 | (stat.S_IXOTH, "-x"), | |
1013 | ] |
|
883 | ] | |
1014 | return "".join([text[bool(m&bit)] for (bit, text) in data]) |
|
884 | return "".join([text[bool(m&bit)] for (bit, text) in data]) | |
1015 |
|
885 | |||
1016 | modestr = property(getmodestr, None, None, "Access mode as string") |
|
886 | modestr = property(getmodestr, None, None, "Access mode as string") | |
1017 |
|
887 | |||
1018 | def getblocks(self): |
|
888 | def getblocks(self): | |
1019 | return self.stat().st_blocks |
|
889 | return self.stat().st_blocks | |
1020 | blocks = property(getblocks, None, None, "File size in blocks") |
|
890 | blocks = property(getblocks, None, None, "File size in blocks") | |
1021 |
|
891 | |||
1022 | def getblksize(self): |
|
892 | def getblksize(self): | |
1023 | return self.stat().st_blksize |
|
893 | return self.stat().st_blksize | |
1024 | blksize = property(getblksize, None, None, "Filesystem block size") |
|
894 | blksize = property(getblksize, None, None, "Filesystem block size") | |
1025 |
|
895 | |||
1026 | def getdev(self): |
|
896 | def getdev(self): | |
1027 | return self.stat().st_dev |
|
897 | return self.stat().st_dev | |
1028 | dev = property(getdev) |
|
898 | dev = property(getdev) | |
1029 |
|
899 | |||
1030 | def getnlink(self): |
|
900 | def getnlink(self): | |
1031 | return self.stat().st_nlink |
|
901 | return self.stat().st_nlink | |
1032 | nlink = property(getnlink, None, None, "Number of links") |
|
902 | nlink = property(getnlink, None, None, "Number of links") | |
1033 |
|
903 | |||
1034 | def getuid(self): |
|
904 | def getuid(self): | |
1035 | return self.stat().st_uid |
|
905 | return self.stat().st_uid | |
1036 | uid = property(getuid, None, None, "User id of file owner") |
|
906 | uid = property(getuid, None, None, "User id of file owner") | |
1037 |
|
907 | |||
1038 | def getgid(self): |
|
908 | def getgid(self): | |
1039 | return self.stat().st_gid |
|
909 | return self.stat().st_gid | |
1040 | gid = property(getgid, None, None, "Group id of file owner") |
|
910 | gid = property(getgid, None, None, "Group id of file owner") | |
1041 |
|
911 | |||
1042 | def getowner(self): |
|
912 | def getowner(self): | |
1043 | stat = self.stat() |
|
913 | stat = self.stat() | |
1044 | try: |
|
914 | try: | |
1045 | return pwd.getpwuid(stat.st_uid).pw_name |
|
915 | return pwd.getpwuid(stat.st_uid).pw_name | |
1046 | except KeyError: |
|
916 | except KeyError: | |
1047 | return stat.st_uid |
|
917 | return stat.st_uid | |
1048 | owner = property(getowner, None, None, "Owner name (or id)") |
|
918 | owner = property(getowner, None, None, "Owner name (or id)") | |
1049 |
|
919 | |||
1050 | def getgroup(self): |
|
920 | def getgroup(self): | |
1051 | stat = self.stat() |
|
921 | stat = self.stat() | |
1052 | try: |
|
922 | try: | |
1053 | return grp.getgrgid(stat.st_gid).gr_name |
|
923 | return grp.getgrgid(stat.st_gid).gr_name | |
1054 | except KeyError: |
|
924 | except KeyError: | |
1055 | return stat.st_gid |
|
925 | return stat.st_gid | |
1056 | group = property(getgroup, None, None, "Group name (or id)") |
|
926 | group = property(getgroup, None, None, "Group name (or id)") | |
1057 |
|
927 | |||
1058 | def getadate(self): |
|
928 | def getadate(self): | |
1059 | return datetime.datetime.utcfromtimestamp(self.atime) |
|
929 | return datetime.datetime.utcfromtimestamp(self.atime) | |
1060 | adate = property(getadate, None, None, "Access date") |
|
930 | adate = property(getadate, None, None, "Access date") | |
1061 |
|
931 | |||
1062 | def getcdate(self): |
|
932 | def getcdate(self): | |
1063 | return datetime.datetime.utcfromtimestamp(self.ctime) |
|
933 | return datetime.datetime.utcfromtimestamp(self.ctime) | |
1064 | cdate = property(getcdate, None, None, "Creation date") |
|
934 | cdate = property(getcdate, None, None, "Creation date") | |
1065 |
|
935 | |||
1066 | def getmdate(self): |
|
936 | def getmdate(self): | |
1067 | return datetime.datetime.utcfromtimestamp(self.mtime) |
|
937 | return datetime.datetime.utcfromtimestamp(self.mtime) | |
1068 | mdate = property(getmdate, None, None, "Modification date") |
|
938 | mdate = property(getmdate, None, None, "Modification date") | |
1069 |
|
939 | |||
1070 | def mimetype(self): |
|
940 | def mimetype(self): | |
1071 | """ |
|
941 | """ | |
1072 | Return MIME type guessed from the extension. |
|
942 | Return MIME type guessed from the extension. | |
1073 | """ |
|
943 | """ | |
1074 | return mimetypes.guess_type(self.basename())[0] |
|
944 | return mimetypes.guess_type(self.basename())[0] | |
1075 |
|
945 | |||
1076 | def encoding(self): |
|
946 | def encoding(self): | |
1077 | """ |
|
947 | """ | |
1078 | Return guessed compression (like "compress" or "gzip"). |
|
948 | Return guessed compression (like "compress" or "gzip"). | |
1079 | """ |
|
949 | """ | |
1080 | return mimetypes.guess_type(self.basename())[1] |
|
950 | return mimetypes.guess_type(self.basename())[1] | |
1081 |
|
951 | |||
1082 | def __repr__(self): |
|
952 | def __repr__(self): | |
1083 | return "ifile(%s)" % path._base.__repr__(self) |
|
953 | return "ifile(%s)" % path._base.__repr__(self) | |
1084 |
|
954 | |||
1085 | defaultattrs = (None, "type", "size", "modestr", "owner", "group", "mdate") |
|
955 | defaultattrs = (None, "type", "size", "modestr", "owner", "group", "mdate") | |
1086 |
|
956 | |||
1087 | def __xattrs__(self, mode): |
|
957 | def __xattrs__(self, mode): | |
1088 | if mode == "detail": |
|
958 | if mode == "detail": | |
1089 | return ( |
|
959 | return ( | |
1090 | "name", |
|
960 | "name", | |
1091 | "basename()", |
|
961 | "basename()", | |
1092 | "abspath()", |
|
962 | "abspath()", | |
1093 | "realpath()", |
|
963 | "realpath()", | |
1094 | "type", |
|
964 | "type", | |
1095 | "mode", |
|
965 | "mode", | |
1096 | "modestr", |
|
966 | "modestr", | |
1097 | "stat()", |
|
967 | "stat()", | |
1098 | "lstat()", |
|
968 | "lstat()", | |
1099 | "uid", |
|
969 | "uid", | |
1100 | "gid", |
|
970 | "gid", | |
1101 | "owner", |
|
971 | "owner", | |
1102 | "group", |
|
972 | "group", | |
1103 | "dev", |
|
973 | "dev", | |
1104 | "nlink", |
|
974 | "nlink", | |
1105 | "ctime", |
|
975 | "ctime", | |
1106 | "mtime", |
|
976 | "mtime", | |
1107 | "atime", |
|
977 | "atime", | |
1108 | "cdate", |
|
978 | "cdate", | |
1109 | "mdate", |
|
979 | "mdate", | |
1110 | "adate", |
|
980 | "adate", | |
1111 | "size", |
|
981 | "size", | |
1112 | "blocks", |
|
982 | "blocks", | |
1113 | "blksize", |
|
983 | "blksize", | |
1114 | "isdir()", |
|
984 | "isdir()", | |
1115 | "islink()", |
|
985 | "islink()", | |
1116 | "mimetype()", |
|
986 | "mimetype()", | |
1117 | "encoding()", |
|
987 | "encoding()", | |
1118 | "-listdir()", |
|
988 | "-listdir()", | |
1119 | "-dirs()", |
|
989 | "-dirs()", | |
1120 | "-files()", |
|
990 | "-files()", | |
1121 | "-walk()", |
|
991 | "-walk()", | |
1122 | "-walkdirs()", |
|
992 | "-walkdirs()", | |
1123 | "-walkfiles()", |
|
993 | "-walkfiles()", | |
1124 | ) |
|
994 | ) | |
1125 | else: |
|
995 | else: | |
1126 | return self.defaultattrs |
|
996 | return self.defaultattrs | |
1127 |
|
997 | |||
1128 | def __xrepr__(self, mode): |
|
998 | def __xrepr__(self, mode): | |
1129 | try: |
|
999 | try: | |
1130 | if self.isdir(): |
|
1000 | if self.isdir(): | |
1131 | name = "idir" |
|
1001 | name = "idir" | |
1132 | style = astyle.style_dir |
|
1002 | style = astyle.style_dir | |
1133 | else: |
|
1003 | else: | |
1134 | name = "ifile" |
|
1004 | name = "ifile" | |
1135 | style = astyle.style_file |
|
1005 | style = astyle.style_file | |
1136 | except IOError: |
|
1006 | except IOError: | |
1137 | name = "ifile" |
|
1007 | name = "ifile" | |
1138 | style = astyle.style_default |
|
1008 | style = astyle.style_default | |
1139 | if mode == "cell" or mode in "header" or mode == "footer": |
|
1009 | if mode == "cell" or mode in "header" or mode == "footer": | |
1140 | abspath = repr(path._base(self.normpath())) |
|
1010 | abspath = repr(path._base(self.normpath())) | |
1141 | if abspath.startswith("u"): |
|
1011 | if abspath.startswith("u"): | |
1142 | abspath = abspath[2:-1] |
|
1012 | abspath = abspath[2:-1] | |
1143 | else: |
|
1013 | else: | |
1144 | abspath = abspath[1:-1] |
|
1014 | abspath = abspath[1:-1] | |
1145 | if mode == "cell": |
|
1015 | if mode == "cell": | |
1146 | yield (style, abspath) |
|
1016 | yield (style, abspath) | |
1147 | else: |
|
1017 | else: | |
1148 | yield (style, "%s(%s)" % (name, abspath)) |
|
1018 | yield (style, "%s(%s)" % (name, abspath)) | |
1149 | else: |
|
1019 | else: | |
1150 | yield (style, repr(self)) |
|
1020 | yield (style, repr(self)) | |
1151 |
|
1021 | |||
1152 | def __iter__(self): |
|
1022 | def __iter__(self): | |
1153 | if self.isdir(): |
|
1023 | if self.isdir(): | |
1154 | yield iparentdir(self / os.pardir) |
|
1024 | yield iparentdir(self / os.pardir) | |
1155 | for child in sorted(self.listdir()): |
|
1025 | for child in sorted(self.listdir()): | |
1156 | yield child |
|
1026 | yield child | |
1157 | else: |
|
1027 | else: | |
1158 | f = self.open("rb") |
|
1028 | f = self.open("rb") | |
1159 | for line in f: |
|
1029 | for line in f: | |
1160 | yield line |
|
1030 | yield line | |
1161 | f.close() |
|
1031 | f.close() | |
1162 |
|
1032 | |||
1163 |
|
1033 | |||
1164 | class iparentdir(ifile): |
|
1034 | class iparentdir(ifile): | |
1165 | def __xrepr__(self, mode): |
|
1035 | def __xrepr__(self, mode): | |
1166 | if mode == "cell": |
|
1036 | if mode == "cell": | |
1167 | yield (astyle.style_dir, os.pardir) |
|
1037 | yield (astyle.style_dir, os.pardir) | |
1168 | else: |
|
1038 | else: | |
1169 | for part in ifile.__xrepr__(self, mode): |
|
1039 | for part in ifile.__xrepr__(self, mode): | |
1170 | yield part |
|
1040 | yield part | |
1171 |
|
1041 | |||
1172 |
|
1042 | |||
1173 | class ils(Table): |
|
1043 | class ils(Table): | |
1174 | """ |
|
1044 | """ | |
1175 | List the current (or a specific) directory. |
|
1045 | List the current (or a specific) directory. | |
1176 |
|
1046 | |||
1177 | Examples: |
|
1047 | Examples: | |
1178 |
|
1048 | |||
1179 | >>> ils |
|
1049 | >>> ils | |
1180 | >>> ils("/usr/local/lib/python2.4") |
|
1050 | >>> ils("/usr/local/lib/python2.4") | |
1181 | >>> ils("~") |
|
1051 | >>> ils("~") | |
1182 | """ |
|
1052 | """ | |
1183 | def __init__(self, base=os.curdir, dirs=True, files=True): |
|
1053 | def __init__(self, base=os.curdir, dirs=True, files=True): | |
1184 | self.base = os.path.expanduser(base) |
|
1054 | self.base = os.path.expanduser(base) | |
1185 | self.dirs = dirs |
|
1055 | self.dirs = dirs | |
1186 | self.files = files |
|
1056 | self.files = files | |
1187 |
|
1057 | |||
1188 | def __iter__(self): |
|
1058 | def __iter__(self): | |
1189 | for child in ifile(self.base).listdir(): |
|
1059 | for child in ifile(self.base).listdir(): | |
1190 | if self.dirs: |
|
1060 | if self.dirs: | |
1191 | if self.files: |
|
1061 | if self.files: | |
1192 | yield child |
|
1062 | yield child | |
1193 | else: |
|
1063 | else: | |
1194 | if child.isdir(): |
|
1064 | if child.isdir(): | |
1195 | yield child |
|
1065 | yield child | |
1196 | elif self.files: |
|
1066 | elif self.files: | |
1197 | if not child.isdir(): |
|
1067 | if not child.isdir(): | |
1198 | yield child |
|
1068 | yield child | |
1199 |
|
1069 | |||
1200 | def __xrepr__(self, mode): |
|
1070 | def __xrepr__(self, mode): | |
1201 | return ifile(self.base).__xrepr__(mode) |
|
1071 | return ifile(self.base).__xrepr__(mode) | |
1202 |
|
1072 | |||
1203 | def __repr__(self): |
|
1073 | def __repr__(self): | |
1204 | return "%s.%s(%r)" % \ |
|
1074 | return "%s.%s(%r)" % \ | |
1205 | (self.__class__.__module__, self.__class__.__name__, self.base) |
|
1075 | (self.__class__.__module__, self.__class__.__name__, self.base) | |
1206 |
|
1076 | |||
1207 |
|
1077 | |||
1208 | class iglob(Table): |
|
1078 | class iglob(Table): | |
1209 | """ |
|
1079 | """ | |
1210 | List all files and directories matching a specified pattern. |
|
1080 | List all files and directories matching a specified pattern. | |
1211 | (See ``glob.glob()`` for more info.). |
|
1081 | (See ``glob.glob()`` for more info.). | |
1212 |
|
1082 | |||
1213 | Examples: |
|
1083 | Examples: | |
1214 |
|
1084 | |||
1215 | >>> iglob("*.py") |
|
1085 | >>> iglob("*.py") | |
1216 | """ |
|
1086 | """ | |
1217 | def __init__(self, glob): |
|
1087 | def __init__(self, glob): | |
1218 | self.glob = glob |
|
1088 | self.glob = glob | |
1219 |
|
1089 | |||
1220 | def __iter__(self): |
|
1090 | def __iter__(self): | |
1221 | for name in glob.glob(self.glob): |
|
1091 | for name in glob.glob(self.glob): | |
1222 | yield ifile(name) |
|
1092 | yield ifile(name) | |
1223 |
|
1093 | |||
1224 | def __xrepr__(self, mode): |
|
1094 | def __xrepr__(self, mode): | |
1225 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1095 | if mode == "header" or mode == "footer" or mode == "cell": | |
1226 | yield (astyle.style_default, |
|
1096 | yield (astyle.style_default, | |
1227 | "%s(%r)" % (self.__class__.__name__, self.glob)) |
|
1097 | "%s(%r)" % (self.__class__.__name__, self.glob)) | |
1228 | else: |
|
1098 | else: | |
1229 | yield (astyle.style_default, repr(self)) |
|
1099 | yield (astyle.style_default, repr(self)) | |
1230 |
|
1100 | |||
1231 | def __repr__(self): |
|
1101 | def __repr__(self): | |
1232 | return "%s.%s(%r)" % \ |
|
1102 | return "%s.%s(%r)" % \ | |
1233 | (self.__class__.__module__, self.__class__.__name__, self.glob) |
|
1103 | (self.__class__.__module__, self.__class__.__name__, self.glob) | |
1234 |
|
1104 | |||
1235 |
|
1105 | |||
1236 | class iwalk(Table): |
|
1106 | class iwalk(Table): | |
1237 | """ |
|
1107 | """ | |
1238 | List all files and directories in a directory and it's subdirectory. |
|
1108 | List all files and directories in a directory and it's subdirectory. | |
1239 |
|
1109 | |||
1240 | >>> iwalk |
|
1110 | >>> iwalk | |
1241 | >>> iwalk("/usr/local/lib/python2.4") |
|
1111 | >>> iwalk("/usr/local/lib/python2.4") | |
1242 | >>> iwalk("~") |
|
1112 | >>> iwalk("~") | |
1243 | """ |
|
1113 | """ | |
1244 | def __init__(self, base=os.curdir, dirs=True, files=True): |
|
1114 | def __init__(self, base=os.curdir, dirs=True, files=True): | |
1245 | self.base = os.path.expanduser(base) |
|
1115 | self.base = os.path.expanduser(base) | |
1246 | self.dirs = dirs |
|
1116 | self.dirs = dirs | |
1247 | self.files = files |
|
1117 | self.files = files | |
1248 |
|
1118 | |||
1249 | def __iter__(self): |
|
1119 | def __iter__(self): | |
1250 | for (dirpath, dirnames, filenames) in os.walk(self.base): |
|
1120 | for (dirpath, dirnames, filenames) in os.walk(self.base): | |
1251 | if self.dirs: |
|
1121 | if self.dirs: | |
1252 | for name in sorted(dirnames): |
|
1122 | for name in sorted(dirnames): | |
1253 | yield ifile(os.path.join(dirpath, name)) |
|
1123 | yield ifile(os.path.join(dirpath, name)) | |
1254 | if self.files: |
|
1124 | if self.files: | |
1255 | for name in sorted(filenames): |
|
1125 | for name in sorted(filenames): | |
1256 | yield ifile(os.path.join(dirpath, name)) |
|
1126 | yield ifile(os.path.join(dirpath, name)) | |
1257 |
|
1127 | |||
1258 | def __xrepr__(self, mode): |
|
1128 | def __xrepr__(self, mode): | |
1259 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1129 | if mode == "header" or mode == "footer" or mode == "cell": | |
1260 | yield (astyle.style_default, |
|
1130 | yield (astyle.style_default, | |
1261 | "%s(%r)" % (self.__class__.__name__, self.base)) |
|
1131 | "%s(%r)" % (self.__class__.__name__, self.base)) | |
1262 | else: |
|
1132 | else: | |
1263 | yield (astyle.style_default, repr(self)) |
|
1133 | yield (astyle.style_default, repr(self)) | |
1264 |
|
1134 | |||
1265 | def __repr__(self): |
|
1135 | def __repr__(self): | |
1266 | return "%s.%s(%r)" % \ |
|
1136 | return "%s.%s(%r)" % \ | |
1267 | (self.__class__.__module__, self.__class__.__name__, self.base) |
|
1137 | (self.__class__.__module__, self.__class__.__name__, self.base) | |
1268 |
|
1138 | |||
1269 |
|
1139 | |||
1270 | class ipwdentry(object): |
|
1140 | class ipwdentry(object): | |
1271 | """ |
|
1141 | """ | |
1272 | ``ipwdentry`` objects encapsulate entries in the Unix user account and |
|
1142 | ``ipwdentry`` objects encapsulate entries in the Unix user account and | |
1273 | password database. |
|
1143 | password database. | |
1274 | """ |
|
1144 | """ | |
1275 | def __init__(self, id): |
|
1145 | def __init__(self, id): | |
1276 | self._id = id |
|
1146 | self._id = id | |
1277 | self._entry = None |
|
1147 | self._entry = None | |
1278 |
|
1148 | |||
1279 | def _getentry(self): |
|
1149 | def _getentry(self): | |
1280 | if self._entry is None: |
|
1150 | if self._entry is None: | |
1281 | if isinstance(self._id, basestring): |
|
1151 | if isinstance(self._id, basestring): | |
1282 | self._entry = pwd.getpwnam(self._id) |
|
1152 | self._entry = pwd.getpwnam(self._id) | |
1283 | else: |
|
1153 | else: | |
1284 | self._entry = pwd.getpwuid(self._id) |
|
1154 | self._entry = pwd.getpwuid(self._id) | |
1285 | return self._entry |
|
1155 | return self._entry | |
1286 |
|
1156 | |||
1287 | def getname(self): |
|
1157 | def getname(self): | |
1288 | if isinstance(self._id, basestring): |
|
1158 | if isinstance(self._id, basestring): | |
1289 | return self._id |
|
1159 | return self._id | |
1290 | else: |
|
1160 | else: | |
1291 | return self._getentry().pw_name |
|
1161 | return self._getentry().pw_name | |
1292 | name = property(getname, None, None, "User name") |
|
1162 | name = property(getname, None, None, "User name") | |
1293 |
|
1163 | |||
1294 | def getpasswd(self): |
|
1164 | def getpasswd(self): | |
1295 | return self._getentry().pw_passwd |
|
1165 | return self._getentry().pw_passwd | |
1296 | passwd = property(getpasswd, None, None, "Password") |
|
1166 | passwd = property(getpasswd, None, None, "Password") | |
1297 |
|
1167 | |||
1298 | def getuid(self): |
|
1168 | def getuid(self): | |
1299 | if isinstance(self._id, basestring): |
|
1169 | if isinstance(self._id, basestring): | |
1300 | return self._getentry().pw_uid |
|
1170 | return self._getentry().pw_uid | |
1301 | else: |
|
1171 | else: | |
1302 | return self._id |
|
1172 | return self._id | |
1303 | uid = property(getuid, None, None, "User id") |
|
1173 | uid = property(getuid, None, None, "User id") | |
1304 |
|
1174 | |||
1305 | def getgid(self): |
|
1175 | def getgid(self): | |
1306 | return self._getentry().pw_gid |
|
1176 | return self._getentry().pw_gid | |
1307 | gid = property(getgid, None, None, "Primary group id") |
|
1177 | gid = property(getgid, None, None, "Primary group id") | |
1308 |
|
1178 | |||
1309 | def getgroup(self): |
|
1179 | def getgroup(self): | |
1310 | return igrpentry(self.gid) |
|
1180 | return igrpentry(self.gid) | |
1311 | group = property(getgroup, None, None, "Group") |
|
1181 | group = property(getgroup, None, None, "Group") | |
1312 |
|
1182 | |||
1313 | def getgecos(self): |
|
1183 | def getgecos(self): | |
1314 | return self._getentry().pw_gecos |
|
1184 | return self._getentry().pw_gecos | |
1315 | gecos = property(getgecos, None, None, "Information (e.g. full user name)") |
|
1185 | gecos = property(getgecos, None, None, "Information (e.g. full user name)") | |
1316 |
|
1186 | |||
1317 | def getdir(self): |
|
1187 | def getdir(self): | |
1318 | return self._getentry().pw_dir |
|
1188 | return self._getentry().pw_dir | |
1319 | dir = property(getdir, None, None, "$HOME directory") |
|
1189 | dir = property(getdir, None, None, "$HOME directory") | |
1320 |
|
1190 | |||
1321 | def getshell(self): |
|
1191 | def getshell(self): | |
1322 | return self._getentry().pw_shell |
|
1192 | return self._getentry().pw_shell | |
1323 | shell = property(getshell, None, None, "Login shell") |
|
1193 | shell = property(getshell, None, None, "Login shell") | |
1324 |
|
1194 | |||
1325 | def __xattrs__(self, mode): |
|
1195 | def __xattrs__(self, mode): | |
1326 | return ("name", "passwd", "uid", "gid", "gecos", "dir", "shell") |
|
1196 | return ("name", "passwd", "uid", "gid", "gecos", "dir", "shell") | |
1327 |
|
1197 | |||
1328 | def __repr__(self): |
|
1198 | def __repr__(self): | |
1329 | return "%s.%s(%r)" % \ |
|
1199 | return "%s.%s(%r)" % \ | |
1330 | (self.__class__.__module__, self.__class__.__name__, self._id) |
|
1200 | (self.__class__.__module__, self.__class__.__name__, self._id) | |
1331 |
|
1201 | |||
1332 |
|
1202 | |||
1333 | class ipwd(Table): |
|
1203 | class ipwd(Table): | |
1334 | """ |
|
1204 | """ | |
1335 | List all entries in the Unix user account and password database. |
|
1205 | List all entries in the Unix user account and password database. | |
1336 |
|
1206 | |||
1337 | Example: |
|
1207 | Example: | |
1338 |
|
1208 | |||
1339 | >>> ipwd | isort("uid") |
|
1209 | >>> ipwd | isort("uid") | |
1340 | """ |
|
1210 | """ | |
1341 | def __iter__(self): |
|
1211 | def __iter__(self): | |
1342 | for entry in pwd.getpwall(): |
|
1212 | for entry in pwd.getpwall(): | |
1343 | yield ipwdentry(entry.pw_name) |
|
1213 | yield ipwdentry(entry.pw_name) | |
1344 |
|
1214 | |||
1345 | def __xrepr__(self, mode): |
|
1215 | def __xrepr__(self, mode): | |
1346 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1216 | if mode == "header" or mode == "footer" or mode == "cell": | |
1347 | yield (astyle.style_default, "%s()" % self.__class__.__name__) |
|
1217 | yield (astyle.style_default, "%s()" % self.__class__.__name__) | |
1348 | else: |
|
1218 | else: | |
1349 | yield (astyle.style_default, repr(self)) |
|
1219 | yield (astyle.style_default, repr(self)) | |
1350 |
|
1220 | |||
1351 |
|
1221 | |||
1352 | class igrpentry(object): |
|
1222 | class igrpentry(object): | |
1353 | """ |
|
1223 | """ | |
1354 | ``igrpentry`` objects encapsulate entries in the Unix group database. |
|
1224 | ``igrpentry`` objects encapsulate entries in the Unix group database. | |
1355 | """ |
|
1225 | """ | |
1356 | def __init__(self, id): |
|
1226 | def __init__(self, id): | |
1357 | self._id = id |
|
1227 | self._id = id | |
1358 | self._entry = None |
|
1228 | self._entry = None | |
1359 |
|
1229 | |||
1360 | def _getentry(self): |
|
1230 | def _getentry(self): | |
1361 | if self._entry is None: |
|
1231 | if self._entry is None: | |
1362 | if isinstance(self._id, basestring): |
|
1232 | if isinstance(self._id, basestring): | |
1363 | self._entry = grp.getgrnam(self._id) |
|
1233 | self._entry = grp.getgrnam(self._id) | |
1364 | else: |
|
1234 | else: | |
1365 | self._entry = grp.getgrgid(self._id) |
|
1235 | self._entry = grp.getgrgid(self._id) | |
1366 | return self._entry |
|
1236 | return self._entry | |
1367 |
|
1237 | |||
1368 | def getname(self): |
|
1238 | def getname(self): | |
1369 | if isinstance(self._id, basestring): |
|
1239 | if isinstance(self._id, basestring): | |
1370 | return self._id |
|
1240 | return self._id | |
1371 | else: |
|
1241 | else: | |
1372 | return self._getentry().gr_name |
|
1242 | return self._getentry().gr_name | |
1373 | name = property(getname, None, None, "Group name") |
|
1243 | name = property(getname, None, None, "Group name") | |
1374 |
|
1244 | |||
1375 | def getpasswd(self): |
|
1245 | def getpasswd(self): | |
1376 | return self._getentry().gr_passwd |
|
1246 | return self._getentry().gr_passwd | |
1377 | passwd = property(getpasswd, None, None, "Password") |
|
1247 | passwd = property(getpasswd, None, None, "Password") | |
1378 |
|
1248 | |||
1379 | def getgid(self): |
|
1249 | def getgid(self): | |
1380 | if isinstance(self._id, basestring): |
|
1250 | if isinstance(self._id, basestring): | |
1381 | return self._getentry().gr_gid |
|
1251 | return self._getentry().gr_gid | |
1382 | else: |
|
1252 | else: | |
1383 | return self._id |
|
1253 | return self._id | |
1384 | gid = property(getgid, None, None, "Group id") |
|
1254 | gid = property(getgid, None, None, "Group id") | |
1385 |
|
1255 | |||
1386 | def getmem(self): |
|
1256 | def getmem(self): | |
1387 | return self._getentry().gr_mem |
|
1257 | return self._getentry().gr_mem | |
1388 | mem = property(getmem, None, None, "Members") |
|
1258 | mem = property(getmem, None, None, "Members") | |
1389 |
|
1259 | |||
1390 | def __xattrs__(self, mode): |
|
1260 | def __xattrs__(self, mode): | |
1391 | return ("name", "passwd", "gid", "mem") |
|
1261 | return ("name", "passwd", "gid", "mem") | |
1392 |
|
1262 | |||
1393 | def __xrepr__(self, mode): |
|
1263 | def __xrepr__(self, mode): | |
1394 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1264 | if mode == "header" or mode == "footer" or mode == "cell": | |
1395 | yield (astyle.style_default, "group ") |
|
1265 | yield (astyle.style_default, "group ") | |
1396 | try: |
|
1266 | try: | |
1397 | yield (astyle.style_default, self.name) |
|
1267 | yield (astyle.style_default, self.name) | |
1398 | except KeyError: |
|
1268 | except KeyError: | |
1399 | if isinstance(self._id, basestring): |
|
1269 | if isinstance(self._id, basestring): | |
1400 | yield (astyle.style_default, self.name_id) |
|
1270 | yield (astyle.style_default, self.name_id) | |
1401 | else: |
|
1271 | else: | |
1402 | yield (astyle.style_type_number, str(self._id)) |
|
1272 | yield (astyle.style_type_number, str(self._id)) | |
1403 | else: |
|
1273 | else: | |
1404 | yield (astyle.style_default, repr(self)) |
|
1274 | yield (astyle.style_default, repr(self)) | |
1405 |
|
1275 | |||
1406 | def __iter__(self): |
|
1276 | def __iter__(self): | |
1407 | for member in self.mem: |
|
1277 | for member in self.mem: | |
1408 | yield ipwdentry(member) |
|
1278 | yield ipwdentry(member) | |
1409 |
|
1279 | |||
1410 | def __repr__(self): |
|
1280 | def __repr__(self): | |
1411 | return "%s.%s(%r)" % \ |
|
1281 | return "%s.%s(%r)" % \ | |
1412 | (self.__class__.__module__, self.__class__.__name__, self._id) |
|
1282 | (self.__class__.__module__, self.__class__.__name__, self._id) | |
1413 |
|
1283 | |||
1414 |
|
1284 | |||
1415 | class igrp(Table): |
|
1285 | class igrp(Table): | |
1416 | """ |
|
1286 | """ | |
1417 | This ``Table`` lists all entries in the Unix group database. |
|
1287 | This ``Table`` lists all entries in the Unix group database. | |
1418 | """ |
|
1288 | """ | |
1419 | def __iter__(self): |
|
1289 | def __iter__(self): | |
1420 | for entry in grp.getgrall(): |
|
1290 | for entry in grp.getgrall(): | |
1421 | yield igrpentry(entry.gr_name) |
|
1291 | yield igrpentry(entry.gr_name) | |
1422 |
|
1292 | |||
1423 | def __xrepr__(self, mode): |
|
1293 | def __xrepr__(self, mode): | |
1424 | if mode == "header" or mode == "footer": |
|
1294 | if mode == "header" or mode == "footer": | |
1425 | yield (astyle.style_default, "%s()" % self.__class__.__name__) |
|
1295 | yield (astyle.style_default, "%s()" % self.__class__.__name__) | |
1426 | else: |
|
1296 | else: | |
1427 | yield (astyle.style_default, repr(self)) |
|
1297 | yield (astyle.style_default, repr(self)) | |
1428 |
|
1298 | |||
1429 |
|
1299 | |||
1430 | class Fields(object): |
|
1300 | class Fields(object): | |
1431 | def __init__(self, fieldnames, **fields): |
|
1301 | def __init__(self, fieldnames, **fields): | |
1432 | self.__fieldnames = [upgradexattr(fieldname) for fieldname in fieldnames] |
|
1302 | self.__fieldnames = [upgradexattr(fieldname) for fieldname in fieldnames] | |
1433 | for (key, value) in fields.iteritems(): |
|
1303 | for (key, value) in fields.iteritems(): | |
1434 | setattr(self, key, value) |
|
1304 | setattr(self, key, value) | |
1435 |
|
1305 | |||
1436 | def __xattrs__(self, mode): |
|
1306 | def __xattrs__(self, mode): | |
1437 | return self.__fieldnames |
|
1307 | return self.__fieldnames | |
1438 |
|
1308 | |||
1439 | def __xrepr__(self, mode): |
|
1309 | def __xrepr__(self, mode): | |
1440 | yield (-1, False) |
|
1310 | yield (-1, False) | |
1441 | if mode == "header" or mode == "cell": |
|
1311 | if mode == "header" or mode == "cell": | |
1442 | yield (astyle.style_default, self.__class__.__name__) |
|
1312 | yield (astyle.style_default, self.__class__.__name__) | |
1443 | yield (astyle.style_default, "(") |
|
1313 | yield (astyle.style_default, "(") | |
1444 | for (i, f) in enumerate(self.__fieldnames): |
|
1314 | for (i, f) in enumerate(self.__fieldnames): | |
1445 | if i: |
|
1315 | if i: | |
1446 | yield (astyle.style_default, ", ") |
|
1316 | yield (astyle.style_default, ", ") | |
1447 | yield (astyle.style_default, f.name()) |
|
1317 | yield (astyle.style_default, f.name()) | |
1448 | yield (astyle.style_default, "=") |
|
1318 | yield (astyle.style_default, "=") | |
1449 | for part in xrepr(getattr(self, f), "default"): |
|
1319 | for part in xrepr(getattr(self, f), "default"): | |
1450 | yield part |
|
1320 | yield part | |
1451 | yield (astyle.style_default, ")") |
|
1321 | yield (astyle.style_default, ")") | |
1452 | elif mode == "footer": |
|
1322 | elif mode == "footer": | |
1453 | yield (astyle.style_default, self.__class__.__name__) |
|
1323 | yield (astyle.style_default, self.__class__.__name__) | |
1454 | yield (astyle.style_default, "(") |
|
1324 | yield (astyle.style_default, "(") | |
1455 | for (i, f) in enumerate(self.__fieldnames): |
|
1325 | for (i, f) in enumerate(self.__fieldnames): | |
1456 | if i: |
|
1326 | if i: | |
1457 | yield (astyle.style_default, ", ") |
|
1327 | yield (astyle.style_default, ", ") | |
1458 | yield (astyle.style_default, f.name()) |
|
1328 | yield (astyle.style_default, f.name()) | |
1459 | yield (astyle.style_default, ")") |
|
1329 | yield (astyle.style_default, ")") | |
1460 | else: |
|
1330 | else: | |
1461 | yield (astyle.style_default, repr(self)) |
|
1331 | yield (astyle.style_default, repr(self)) | |
1462 |
|
1332 | |||
1463 |
|
1333 | |||
1464 | class FieldTable(Table, list): |
|
1334 | class FieldTable(Table, list): | |
1465 | def __init__(self, *fields): |
|
1335 | def __init__(self, *fields): | |
1466 | Table.__init__(self) |
|
1336 | Table.__init__(self) | |
1467 | list.__init__(self) |
|
1337 | list.__init__(self) | |
1468 | self.fields = fields |
|
1338 | self.fields = fields | |
1469 |
|
1339 | |||
1470 | def add(self, **fields): |
|
1340 | def add(self, **fields): | |
1471 | self.append(Fields(self.fields, **fields)) |
|
1341 | self.append(Fields(self.fields, **fields)) | |
1472 |
|
1342 | |||
1473 | def __xrepr__(self, mode): |
|
1343 | def __xrepr__(self, mode): | |
1474 | yield (-1, False) |
|
1344 | yield (-1, False) | |
1475 | if mode == "header" or mode == "footer": |
|
1345 | if mode == "header" or mode == "footer": | |
1476 | yield (astyle.style_default, self.__class__.__name__) |
|
1346 | yield (astyle.style_default, self.__class__.__name__) | |
1477 | yield (astyle.style_default, "(") |
|
1347 | yield (astyle.style_default, "(") | |
1478 | for (i, f) in enumerate(self.__fieldnames): |
|
1348 | for (i, f) in enumerate(self.__fieldnames): | |
1479 | if i: |
|
1349 | if i: | |
1480 | yield (astyle.style_default, ", ") |
|
1350 | yield (astyle.style_default, ", ") | |
1481 | yield (astyle.style_default, f) |
|
1351 | yield (astyle.style_default, f) | |
1482 | yield (astyle.style_default, ")") |
|
1352 | yield (astyle.style_default, ")") | |
1483 | else: |
|
1353 | else: | |
1484 | yield (astyle.style_default, repr(self)) |
|
1354 | yield (astyle.style_default, repr(self)) | |
1485 |
|
1355 | |||
1486 | def __repr__(self): |
|
1356 | def __repr__(self): | |
1487 | return "<%s.%s object with fields=%r at 0x%x>" % \ |
|
1357 | return "<%s.%s object with fields=%r at 0x%x>" % \ | |
1488 | (self.__class__.__module__, self.__class__.__name__, |
|
1358 | (self.__class__.__module__, self.__class__.__name__, | |
1489 | ", ".join(map(repr, self.fields)), id(self)) |
|
1359 | ", ".join(map(repr, self.fields)), id(self)) | |
1490 |
|
1360 | |||
1491 |
|
1361 | |||
1492 | class List(list): |
|
1362 | class List(list): | |
1493 | def __xattrs__(self, mode): |
|
1363 | def __xattrs__(self, mode): | |
1494 | return xrange(len(self)) |
|
1364 | return xrange(len(self)) | |
1495 |
|
1365 | |||
1496 | def __xrepr__(self, mode): |
|
1366 | def __xrepr__(self, mode): | |
1497 | yield (-1, False) |
|
1367 | yield (-1, False) | |
1498 | if mode == "header" or mode == "cell" or mode == "footer" or mode == "default": |
|
1368 | if mode == "header" or mode == "cell" or mode == "footer" or mode == "default": | |
1499 | yield (astyle.style_default, self.__class__.__name__) |
|
1369 | yield (astyle.style_default, self.__class__.__name__) | |
1500 | yield (astyle.style_default, "(") |
|
1370 | yield (astyle.style_default, "(") | |
1501 | for (i, item) in enumerate(self): |
|
1371 | for (i, item) in enumerate(self): | |
1502 | if i: |
|
1372 | if i: | |
1503 | yield (astyle.style_default, ", ") |
|
1373 | yield (astyle.style_default, ", ") | |
1504 | for part in xrepr(item, "default"): |
|
1374 | for part in xrepr(item, "default"): | |
1505 | yield part |
|
1375 | yield part | |
1506 | yield (astyle.style_default, ")") |
|
1376 | yield (astyle.style_default, ")") | |
1507 | else: |
|
1377 | else: | |
1508 | yield (astyle.style_default, repr(self)) |
|
1378 | yield (astyle.style_default, repr(self)) | |
1509 |
|
1379 | |||
1510 |
|
1380 | |||
1511 | class ienv(Table): |
|
1381 | class ienv(Table): | |
1512 | """ |
|
1382 | """ | |
1513 | List environment variables. |
|
1383 | List environment variables. | |
1514 |
|
1384 | |||
1515 | Example: |
|
1385 | Example: | |
1516 |
|
1386 | |||
1517 | >>> ienv |
|
1387 | >>> ienv | |
1518 | """ |
|
1388 | """ | |
1519 |
|
1389 | |||
1520 | def __iter__(self): |
|
1390 | def __iter__(self): | |
1521 | fields = ("key", "value") |
|
1391 | fields = ("key", "value") | |
1522 | for (key, value) in os.environ.iteritems(): |
|
1392 | for (key, value) in os.environ.iteritems(): | |
1523 | yield Fields(fields, key=key, value=value) |
|
1393 | yield Fields(fields, key=key, value=value) | |
1524 |
|
1394 | |||
1525 | def __xrepr__(self, mode): |
|
1395 | def __xrepr__(self, mode): | |
1526 | if mode == "header" or mode == "cell": |
|
1396 | if mode == "header" or mode == "cell": | |
1527 | yield (astyle.style_default, "%s()" % self.__class__.__name__) |
|
1397 | yield (astyle.style_default, "%s()" % self.__class__.__name__) | |
1528 | else: |
|
1398 | else: | |
1529 | yield (astyle.style_default, repr(self)) |
|
1399 | yield (astyle.style_default, repr(self)) | |
1530 |
|
1400 | |||
1531 |
|
1401 | |||
1532 | class icsv(Pipe): |
|
1402 | class icsv(Pipe): | |
1533 | """ |
|
1403 | """ | |
1534 | This ``Pipe`` lists turn the input (with must be a pipe outputting lines |
|
1404 | This ``Pipe`` lists turn the input (with must be a pipe outputting lines | |
1535 | or an ``ifile``) into lines of CVS columns. |
|
1405 | or an ``ifile``) into lines of CVS columns. | |
1536 | """ |
|
1406 | """ | |
1537 | def __init__(self, **csvargs): |
|
1407 | def __init__(self, **csvargs): | |
1538 | """ |
|
1408 | """ | |
1539 | Create an ``icsv`` object. ``cvsargs`` will be passed through as |
|
1409 | Create an ``icsv`` object. ``cvsargs`` will be passed through as | |
1540 | keyword arguments to ``cvs.reader()``. |
|
1410 | keyword arguments to ``cvs.reader()``. | |
1541 | """ |
|
1411 | """ | |
1542 | self.csvargs = csvargs |
|
1412 | self.csvargs = csvargs | |
1543 |
|
1413 | |||
1544 | def __iter__(self): |
|
1414 | def __iter__(self): | |
1545 | input = self.input |
|
1415 | input = self.input | |
1546 | if isinstance(input, ifile): |
|
1416 | if isinstance(input, ifile): | |
1547 | input = input.open("rb") |
|
1417 | input = input.open("rb") | |
1548 | reader = csv.reader(input, **self.csvargs) |
|
1418 | reader = csv.reader(input, **self.csvargs) | |
1549 | for line in reader: |
|
1419 | for line in reader: | |
1550 | yield List(line) |
|
1420 | yield List(line) | |
1551 |
|
1421 | |||
1552 | def __xrepr__(self, mode): |
|
1422 | def __xrepr__(self, mode): | |
1553 | yield (-1, False) |
|
1423 | yield (-1, False) | |
1554 | if mode == "header" or mode == "footer": |
|
1424 | if mode == "header" or mode == "footer": | |
1555 | input = getattr(self, "input", None) |
|
1425 | input = getattr(self, "input", None) | |
1556 | if input is not None: |
|
1426 | if input is not None: | |
1557 | for part in xrepr(input, mode): |
|
1427 | for part in xrepr(input, mode): | |
1558 | yield part |
|
1428 | yield part | |
1559 | yield (astyle.style_default, " | ") |
|
1429 | yield (astyle.style_default, " | ") | |
1560 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1430 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1561 | for (i, (name, value)) in enumerate(self.csvargs.iteritems()): |
|
1431 | for (i, (name, value)) in enumerate(self.csvargs.iteritems()): | |
1562 | if i: |
|
1432 | if i: | |
1563 | yield (astyle.style_default, ", ") |
|
1433 | yield (astyle.style_default, ", ") | |
1564 | yield (astyle.style_default, name) |
|
1434 | yield (astyle.style_default, name) | |
1565 | yield (astyle.style_default, "=") |
|
1435 | yield (astyle.style_default, "=") | |
1566 | for part in xrepr(value, "default"): |
|
1436 | for part in xrepr(value, "default"): | |
1567 | yield part |
|
1437 | yield part | |
1568 | yield (astyle.style_default, ")") |
|
1438 | yield (astyle.style_default, ")") | |
1569 | else: |
|
1439 | else: | |
1570 | yield (astyle.style_default, repr(self)) |
|
1440 | yield (astyle.style_default, repr(self)) | |
1571 |
|
1441 | |||
1572 | def __repr__(self): |
|
1442 | def __repr__(self): | |
1573 | args = ", ".join(["%s=%r" % item for item in self.csvargs.iteritems()]) |
|
1443 | args = ", ".join(["%s=%r" % item for item in self.csvargs.iteritems()]) | |
1574 | return "<%s.%s %s at 0x%x>" % \ |
|
1444 | return "<%s.%s %s at 0x%x>" % \ | |
1575 | (self.__class__.__module__, self.__class__.__name__, args, id(self)) |
|
1445 | (self.__class__.__module__, self.__class__.__name__, args, id(self)) | |
1576 |
|
1446 | |||
1577 |
|
1447 | |||
1578 | class ix(Table): |
|
1448 | class ix(Table): | |
1579 | """ |
|
1449 | """ | |
1580 | Execute a system command and list its output as lines |
|
1450 | Execute a system command and list its output as lines | |
1581 | (similar to ``os.popen()``). |
|
1451 | (similar to ``os.popen()``). | |
1582 |
|
1452 | |||
1583 | Examples: |
|
1453 | Examples: | |
1584 |
|
1454 | |||
1585 | >>> ix("ps x") |
|
1455 | >>> ix("ps x") | |
1586 | >>> ix("find .") | ifile |
|
1456 | >>> ix("find .") | ifile | |
1587 | """ |
|
1457 | """ | |
1588 | def __init__(self, cmd): |
|
1458 | def __init__(self, cmd): | |
1589 | self.cmd = cmd |
|
1459 | self.cmd = cmd | |
1590 | self._pipeout = None |
|
1460 | self._pipeout = None | |
1591 |
|
1461 | |||
1592 | def __iter__(self): |
|
1462 | def __iter__(self): | |
1593 | (_pipein, self._pipeout) = os.popen4(self.cmd) |
|
1463 | (_pipein, self._pipeout) = os.popen4(self.cmd) | |
1594 | _pipein.close() |
|
1464 | _pipein.close() | |
1595 | for l in self._pipeout: |
|
1465 | for l in self._pipeout: | |
1596 | yield l.rstrip("\r\n") |
|
1466 | yield l.rstrip("\r\n") | |
1597 | self._pipeout.close() |
|
1467 | self._pipeout.close() | |
1598 | self._pipeout = None |
|
1468 | self._pipeout = None | |
1599 |
|
1469 | |||
1600 | def __del__(self): |
|
1470 | def __del__(self): | |
1601 | if self._pipeout is not None and not self._pipeout.closed: |
|
1471 | if self._pipeout is not None and not self._pipeout.closed: | |
1602 | self._pipeout.close() |
|
1472 | self._pipeout.close() | |
1603 | self._pipeout = None |
|
1473 | self._pipeout = None | |
1604 |
|
1474 | |||
1605 | def __xrepr__(self, mode): |
|
1475 | def __xrepr__(self, mode): | |
1606 | if mode == "header" or mode == "footer": |
|
1476 | if mode == "header" or mode == "footer": | |
1607 | yield (astyle.style_default, |
|
1477 | yield (astyle.style_default, | |
1608 | "%s(%r)" % (self.__class__.__name__, self.cmd)) |
|
1478 | "%s(%r)" % (self.__class__.__name__, self.cmd)) | |
1609 | else: |
|
1479 | else: | |
1610 | yield (astyle.style_default, repr(self)) |
|
1480 | yield (astyle.style_default, repr(self)) | |
1611 |
|
1481 | |||
1612 | def __repr__(self): |
|
1482 | def __repr__(self): | |
1613 | return "%s.%s(%r)" % \ |
|
1483 | return "%s.%s(%r)" % \ | |
1614 | (self.__class__.__module__, self.__class__.__name__, self.cmd) |
|
1484 | (self.__class__.__module__, self.__class__.__name__, self.cmd) | |
1615 |
|
1485 | |||
1616 |
|
1486 | |||
1617 | class ifilter(Pipe): |
|
1487 | class ifilter(Pipe): | |
1618 | """ |
|
1488 | """ | |
1619 | Filter an input pipe. Only objects where an expression evaluates to true |
|
1489 | Filter an input pipe. Only objects where an expression evaluates to true | |
1620 | (and doesn't raise an exception) are listed. |
|
1490 | (and doesn't raise an exception) are listed. | |
1621 |
|
1491 | |||
1622 | Examples: |
|
1492 | Examples: | |
1623 |
|
1493 | |||
1624 | >>> ils | ifilter("_.isfile() and size>1000") |
|
1494 | >>> ils | ifilter("_.isfile() and size>1000") | |
1625 | >>> igrp | ifilter("len(mem)") |
|
1495 | >>> igrp | ifilter("len(mem)") | |
1626 | >>> sys.modules | ifilter(lambda _:_.value is not None) |
|
1496 | >>> sys.modules | ifilter(lambda _:_.value is not None) | |
1627 | """ |
|
1497 | """ | |
1628 |
|
1498 | |||
1629 | def __init__(self, expr, globals=None, errors="raiseifallfail"): |
|
1499 | def __init__(self, expr, globals=None, errors="raiseifallfail"): | |
1630 | """ |
|
1500 | """ | |
1631 | Create an ``ifilter`` object. ``expr`` can be a callable or a string |
|
1501 | Create an ``ifilter`` object. ``expr`` can be a callable or a string | |
1632 | containing an expression. ``globals`` will be used as the global |
|
1502 | containing an expression. ``globals`` will be used as the global | |
1633 | namespace for calling string expressions (defaulting to IPython's |
|
1503 | namespace for calling string expressions (defaulting to IPython's | |
1634 | user namespace). ``errors`` specifies how exception during evaluation |
|
1504 | user namespace). ``errors`` specifies how exception during evaluation | |
1635 | of ``expr`` are handled: |
|
1505 | of ``expr`` are handled: | |
1636 |
|
1506 | |||
1637 | * ``drop``: drop all items that have errors; |
|
1507 | * ``drop``: drop all items that have errors; | |
1638 |
|
1508 | |||
1639 | * ``keep``: keep all items that have errors; |
|
1509 | * ``keep``: keep all items that have errors; | |
1640 |
|
1510 | |||
1641 | * ``keeperror``: keep the exception of all items that have errors; |
|
1511 | * ``keeperror``: keep the exception of all items that have errors; | |
1642 |
|
1512 | |||
1643 | * ``raise``: raise the exception; |
|
1513 | * ``raise``: raise the exception; | |
1644 |
|
1514 | |||
1645 | * ``raiseifallfail``: raise the first exception if all items have errors; |
|
1515 | * ``raiseifallfail``: raise the first exception if all items have errors; | |
1646 | otherwise drop those with errors (this is the default). |
|
1516 | otherwise drop those with errors (this is the default). | |
1647 | """ |
|
1517 | """ | |
1648 | self.expr = expr |
|
1518 | self.expr = expr | |
1649 | self.globals = globals |
|
1519 | self.globals = globals | |
1650 | self.errors = errors |
|
1520 | self.errors = errors | |
1651 |
|
1521 | |||
1652 | def __iter__(self): |
|
1522 | def __iter__(self): | |
1653 | if callable(self.expr): |
|
1523 | if callable(self.expr): | |
1654 | test = self.expr |
|
1524 | test = self.expr | |
1655 | else: |
|
1525 | else: | |
1656 | g = getglobals(self.globals) |
|
1526 | g = getglobals(self.globals) | |
1657 | expr = compile(self.expr, "ipipe-expression", "eval") |
|
1527 | expr = compile(self.expr, "ipipe-expression", "eval") | |
1658 | def test(item): |
|
1528 | def test(item): | |
1659 | return eval(expr, g, AttrNamespace(item)) |
|
1529 | return eval(expr, g, AttrNamespace(item)) | |
1660 |
|
1530 | |||
1661 | ok = 0 |
|
1531 | ok = 0 | |
1662 | exc_info = None |
|
1532 | exc_info = None | |
1663 | for item in xiter(self.input): |
|
1533 | for item in xiter(self.input): | |
1664 | try: |
|
1534 | try: | |
1665 | if test(item): |
|
1535 | if test(item): | |
1666 | yield item |
|
1536 | yield item | |
1667 | ok += 1 |
|
1537 | ok += 1 | |
1668 | except (KeyboardInterrupt, SystemExit): |
|
1538 | except (KeyboardInterrupt, SystemExit): | |
1669 | raise |
|
1539 | raise | |
1670 | except Exception, exc: |
|
1540 | except Exception, exc: | |
1671 | if self.errors == "drop": |
|
1541 | if self.errors == "drop": | |
1672 | pass # Ignore errors |
|
1542 | pass # Ignore errors | |
1673 | elif self.errors == "keep": |
|
1543 | elif self.errors == "keep": | |
1674 | yield item |
|
1544 | yield item | |
1675 | elif self.errors == "keeperror": |
|
1545 | elif self.errors == "keeperror": | |
1676 | yield exc |
|
1546 | yield exc | |
1677 | elif self.errors == "raise": |
|
1547 | elif self.errors == "raise": | |
1678 | raise |
|
1548 | raise | |
1679 | elif self.errors == "raiseifallfail": |
|
1549 | elif self.errors == "raiseifallfail": | |
1680 | if exc_info is None: |
|
1550 | if exc_info is None: | |
1681 | exc_info = sys.exc_info() |
|
1551 | exc_info = sys.exc_info() | |
1682 | if not ok and exc_info is not None: |
|
1552 | if not ok and exc_info is not None: | |
1683 | raise exc_info[0], exc_info[1], exc_info[2] |
|
1553 | raise exc_info[0], exc_info[1], exc_info[2] | |
1684 |
|
1554 | |||
1685 | def __xrepr__(self, mode): |
|
1555 | def __xrepr__(self, mode): | |
1686 | if mode == "header" or mode == "footer": |
|
1556 | if mode == "header" or mode == "footer": | |
1687 | input = getattr(self, "input", None) |
|
1557 | input = getattr(self, "input", None) | |
1688 | if input is not None: |
|
1558 | if input is not None: | |
1689 | for part in xrepr(input, mode): |
|
1559 | for part in xrepr(input, mode): | |
1690 | yield part |
|
1560 | yield part | |
1691 | yield (astyle.style_default, " | ") |
|
1561 | yield (astyle.style_default, " | ") | |
1692 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1562 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1693 | for part in xrepr(self.expr, "default"): |
|
1563 | for part in xrepr(self.expr, "default"): | |
1694 | yield part |
|
1564 | yield part | |
1695 | yield (astyle.style_default, ")") |
|
1565 | yield (astyle.style_default, ")") | |
1696 | else: |
|
1566 | else: | |
1697 | yield (astyle.style_default, repr(self)) |
|
1567 | yield (astyle.style_default, repr(self)) | |
1698 |
|
1568 | |||
1699 | def __repr__(self): |
|
1569 | def __repr__(self): | |
1700 | return "<%s.%s expr=%r at 0x%x>" % \ |
|
1570 | return "<%s.%s expr=%r at 0x%x>" % \ | |
1701 | (self.__class__.__module__, self.__class__.__name__, |
|
1571 | (self.__class__.__module__, self.__class__.__name__, | |
1702 | self.expr, id(self)) |
|
1572 | self.expr, id(self)) | |
1703 |
|
1573 | |||
1704 |
|
1574 | |||
1705 | class ieval(Pipe): |
|
1575 | class ieval(Pipe): | |
1706 | """ |
|
1576 | """ | |
1707 | Evaluate an expression for each object in the input pipe. |
|
1577 | Evaluate an expression for each object in the input pipe. | |
1708 |
|
1578 | |||
1709 | Examples: |
|
1579 | Examples: | |
1710 |
|
1580 | |||
1711 | >>> ils | ieval("_.abspath()") |
|
1581 | >>> ils | ieval("_.abspath()") | |
1712 | >>> sys.path | ieval(ifile) |
|
1582 | >>> sys.path | ieval(ifile) | |
1713 | """ |
|
1583 | """ | |
1714 |
|
1584 | |||
1715 | def __init__(self, expr, globals=None, errors="raiseifallfail"): |
|
1585 | def __init__(self, expr, globals=None, errors="raiseifallfail"): | |
1716 | """ |
|
1586 | """ | |
1717 | Create an ``ieval`` object. ``expr`` can be a callable or a string |
|
1587 | Create an ``ieval`` object. ``expr`` can be a callable or a string | |
1718 | containing an expression. For the meaning of ``globals`` and |
|
1588 | containing an expression. For the meaning of ``globals`` and | |
1719 | ``errors`` see ``ifilter``. |
|
1589 | ``errors`` see ``ifilter``. | |
1720 | """ |
|
1590 | """ | |
1721 | self.expr = expr |
|
1591 | self.expr = expr | |
1722 | self.globals = globals |
|
1592 | self.globals = globals | |
1723 | self.errors = errors |
|
1593 | self.errors = errors | |
1724 |
|
1594 | |||
1725 | def __iter__(self): |
|
1595 | def __iter__(self): | |
1726 | if callable(self.expr): |
|
1596 | if callable(self.expr): | |
1727 | do = self.expr |
|
1597 | do = self.expr | |
1728 | else: |
|
1598 | else: | |
1729 | g = getglobals(self.globals) |
|
1599 | g = getglobals(self.globals) | |
1730 | expr = compile(self.expr, "ipipe-expression", "eval") |
|
1600 | expr = compile(self.expr, "ipipe-expression", "eval") | |
1731 | def do(item): |
|
1601 | def do(item): | |
1732 | return eval(expr, g, AttrNamespace(item)) |
|
1602 | return eval(expr, g, AttrNamespace(item)) | |
1733 |
|
1603 | |||
1734 | ok = 0 |
|
1604 | ok = 0 | |
1735 | exc_info = None |
|
1605 | exc_info = None | |
1736 | for item in xiter(self.input): |
|
1606 | for item in xiter(self.input): | |
1737 | try: |
|
1607 | try: | |
1738 | yield do(item) |
|
1608 | yield do(item) | |
1739 | except (KeyboardInterrupt, SystemExit): |
|
1609 | except (KeyboardInterrupt, SystemExit): | |
1740 | raise |
|
1610 | raise | |
1741 | except Exception, exc: |
|
1611 | except Exception, exc: | |
1742 | if self.errors == "drop": |
|
1612 | if self.errors == "drop": | |
1743 | pass # Ignore errors |
|
1613 | pass # Ignore errors | |
1744 | elif self.errors == "keep": |
|
1614 | elif self.errors == "keep": | |
1745 | yield item |
|
1615 | yield item | |
1746 | elif self.errors == "keeperror": |
|
1616 | elif self.errors == "keeperror": | |
1747 | yield exc |
|
1617 | yield exc | |
1748 | elif self.errors == "raise": |
|
1618 | elif self.errors == "raise": | |
1749 | raise |
|
1619 | raise | |
1750 | elif self.errors == "raiseifallfail": |
|
1620 | elif self.errors == "raiseifallfail": | |
1751 | if exc_info is None: |
|
1621 | if exc_info is None: | |
1752 | exc_info = sys.exc_info() |
|
1622 | exc_info = sys.exc_info() | |
1753 | if not ok and exc_info is not None: |
|
1623 | if not ok and exc_info is not None: | |
1754 | raise exc_info[0], exc_info[1], exc_info[2] |
|
1624 | raise exc_info[0], exc_info[1], exc_info[2] | |
1755 |
|
1625 | |||
1756 | def __xrepr__(self, mode): |
|
1626 | def __xrepr__(self, mode): | |
1757 | if mode == "header" or mode == "footer": |
|
1627 | if mode == "header" or mode == "footer": | |
1758 | input = getattr(self, "input", None) |
|
1628 | input = getattr(self, "input", None) | |
1759 | if input is not None: |
|
1629 | if input is not None: | |
1760 | for part in xrepr(input, mode): |
|
1630 | for part in xrepr(input, mode): | |
1761 | yield part |
|
1631 | yield part | |
1762 | yield (astyle.style_default, " | ") |
|
1632 | yield (astyle.style_default, " | ") | |
1763 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1633 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1764 | for part in xrepr(self.expr, "default"): |
|
1634 | for part in xrepr(self.expr, "default"): | |
1765 | yield part |
|
1635 | yield part | |
1766 | yield (astyle.style_default, ")") |
|
1636 | yield (astyle.style_default, ")") | |
1767 | else: |
|
1637 | else: | |
1768 | yield (astyle.style_default, repr(self)) |
|
1638 | yield (astyle.style_default, repr(self)) | |
1769 |
|
1639 | |||
1770 | def __repr__(self): |
|
1640 | def __repr__(self): | |
1771 | return "<%s.%s expr=%r at 0x%x>" % \ |
|
1641 | return "<%s.%s expr=%r at 0x%x>" % \ | |
1772 | (self.__class__.__module__, self.__class__.__name__, |
|
1642 | (self.__class__.__module__, self.__class__.__name__, | |
1773 | self.expr, id(self)) |
|
1643 | self.expr, id(self)) | |
1774 |
|
1644 | |||
1775 |
|
1645 | |||
1776 | class ienum(Pipe): |
|
1646 | class ienum(Pipe): | |
1777 | """ |
|
1647 | """ | |
1778 | Enumerate the input pipe (i.e. wrap each input object in an object |
|
1648 | Enumerate the input pipe (i.e. wrap each input object in an object | |
1779 | with ``index`` and ``object`` attributes). |
|
1649 | with ``index`` and ``object`` attributes). | |
1780 |
|
1650 | |||
1781 | Examples: |
|
1651 | Examples: | |
1782 |
|
1652 | |||
1783 | >>> xrange(20) | ieval("_,_*_") | ienum | ifilter("index % 2 == 0") | ieval("object") |
|
1653 | >>> xrange(20) | ieval("_,_*_") | ienum | ifilter("index % 2 == 0") | ieval("object") | |
1784 | """ |
|
1654 | """ | |
1785 | def __iter__(self): |
|
1655 | def __iter__(self): | |
1786 | fields = ("index", "object") |
|
1656 | fields = ("index", "object") | |
1787 | for (index, object) in enumerate(xiter(self.input)): |
|
1657 | for (index, object) in enumerate(xiter(self.input)): | |
1788 | yield Fields(fields, index=index, object=object) |
|
1658 | yield Fields(fields, index=index, object=object) | |
1789 |
|
1659 | |||
1790 |
|
1660 | |||
1791 | class isort(Pipe): |
|
1661 | class isort(Pipe): | |
1792 | """ |
|
1662 | """ | |
1793 | Sorts the input pipe. |
|
1663 | Sorts the input pipe. | |
1794 |
|
1664 | |||
1795 | Examples: |
|
1665 | Examples: | |
1796 |
|
1666 | |||
1797 | >>> ils | isort("size") |
|
1667 | >>> ils | isort("size") | |
1798 | >>> ils | isort("_.isdir(), _.lower()", reverse=True) |
|
1668 | >>> ils | isort("_.isdir(), _.lower()", reverse=True) | |
1799 | """ |
|
1669 | """ | |
1800 |
|
1670 | |||
1801 | def __init__(self, key=None, globals=None, reverse=False): |
|
1671 | def __init__(self, key=None, globals=None, reverse=False): | |
1802 | """ |
|
1672 | """ | |
1803 | Create an ``isort`` object. ``key`` can be a callable or a string |
|
1673 | Create an ``isort`` object. ``key`` can be a callable or a string | |
1804 | containing an expression (or ``None`` in which case the items |
|
1674 | containing an expression (or ``None`` in which case the items | |
1805 | themselves will be sorted). If ``reverse`` is true the sort order |
|
1675 | themselves will be sorted). If ``reverse`` is true the sort order | |
1806 | will be reversed. For the meaning of ``globals`` see ``ifilter``. |
|
1676 | will be reversed. For the meaning of ``globals`` see ``ifilter``. | |
1807 | """ |
|
1677 | """ | |
1808 | self.key = key |
|
1678 | self.key = key | |
1809 | self.globals = globals |
|
1679 | self.globals = globals | |
1810 | self.reverse = reverse |
|
1680 | self.reverse = reverse | |
1811 |
|
1681 | |||
1812 | def __iter__(self): |
|
1682 | def __iter__(self): | |
1813 | if self.key is None: |
|
1683 | if self.key is None: | |
1814 | items = sorted(xiter(self.input), reverse=self.reverse) |
|
1684 | items = sorted(xiter(self.input), reverse=self.reverse) | |
1815 | elif callable(self.key): |
|
1685 | elif callable(self.key): | |
1816 | items = sorted(xiter(self.input), key=self.key, reverse=self.reverse) |
|
1686 | items = sorted(xiter(self.input), key=self.key, reverse=self.reverse) | |
1817 | else: |
|
1687 | else: | |
1818 | g = getglobals(self.globals) |
|
1688 | g = getglobals(self.globals) | |
1819 | key = compile(self.key, "ipipe-expression", "eval") |
|
1689 | key = compile(self.key, "ipipe-expression", "eval") | |
1820 | def realkey(item): |
|
1690 | def realkey(item): | |
1821 | return eval(key, g, AttrNamespace(item)) |
|
1691 | return eval(key, g, AttrNamespace(item)) | |
1822 | items = sorted(xiter(self.input), key=realkey, reverse=self.reverse) |
|
1692 | items = sorted(xiter(self.input), key=realkey, reverse=self.reverse) | |
1823 | for item in items: |
|
1693 | for item in items: | |
1824 | yield item |
|
1694 | yield item | |
1825 |
|
1695 | |||
1826 | def __xrepr__(self, mode): |
|
1696 | def __xrepr__(self, mode): | |
1827 | if mode == "header" or mode == "footer": |
|
1697 | if mode == "header" or mode == "footer": | |
1828 | input = getattr(self, "input", None) |
|
1698 | input = getattr(self, "input", None) | |
1829 | if input is not None: |
|
1699 | if input is not None: | |
1830 | for part in xrepr(input, mode): |
|
1700 | for part in xrepr(input, mode): | |
1831 | yield part |
|
1701 | yield part | |
1832 | yield (astyle.style_default, " | ") |
|
1702 | yield (astyle.style_default, " | ") | |
1833 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1703 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1834 | for part in xrepr(self.key, "default"): |
|
1704 | for part in xrepr(self.key, "default"): | |
1835 | yield part |
|
1705 | yield part | |
1836 | if self.reverse: |
|
1706 | if self.reverse: | |
1837 | yield (astyle.style_default, ", ") |
|
1707 | yield (astyle.style_default, ", ") | |
1838 | for part in xrepr(True, "default"): |
|
1708 | for part in xrepr(True, "default"): | |
1839 | yield part |
|
1709 | yield part | |
1840 | yield (astyle.style_default, ")") |
|
1710 | yield (astyle.style_default, ")") | |
1841 | else: |
|
1711 | else: | |
1842 | yield (astyle.style_default, repr(self)) |
|
1712 | yield (astyle.style_default, repr(self)) | |
1843 |
|
1713 | |||
1844 | def __repr__(self): |
|
1714 | def __repr__(self): | |
1845 | return "<%s.%s key=%r reverse=%r at 0x%x>" % \ |
|
1715 | return "<%s.%s key=%r reverse=%r at 0x%x>" % \ | |
1846 | (self.__class__.__module__, self.__class__.__name__, |
|
1716 | (self.__class__.__module__, self.__class__.__name__, | |
1847 | self.key, self.reverse, id(self)) |
|
1717 | self.key, self.reverse, id(self)) | |
1848 |
|
1718 | |||
1849 |
|
1719 | |||
1850 | tab = 3 # for expandtabs() |
|
1720 | tab = 3 # for expandtabs() | |
1851 |
|
1721 | |||
1852 | def _format(field): |
|
1722 | def _format(field): | |
1853 | if isinstance(field, str): |
|
1723 | if isinstance(field, str): | |
1854 | text = repr(field.expandtabs(tab))[1:-1] |
|
1724 | text = repr(field.expandtabs(tab))[1:-1] | |
1855 | elif isinstance(field, unicode): |
|
1725 | elif isinstance(field, unicode): | |
1856 | text = repr(field.expandtabs(tab))[2:-1] |
|
1726 | text = repr(field.expandtabs(tab))[2:-1] | |
1857 | elif isinstance(field, datetime.datetime): |
|
1727 | elif isinstance(field, datetime.datetime): | |
1858 | # Don't use strftime() here, as this requires year >= 1900 |
|
1728 | # Don't use strftime() here, as this requires year >= 1900 | |
1859 | text = "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ |
|
1729 | text = "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ | |
1860 | (field.year, field.month, field.day, |
|
1730 | (field.year, field.month, field.day, | |
1861 | field.hour, field.minute, field.second, field.microsecond) |
|
1731 | field.hour, field.minute, field.second, field.microsecond) | |
1862 | elif isinstance(field, datetime.date): |
|
1732 | elif isinstance(field, datetime.date): | |
1863 | text = "%04d-%02d-%02d" % (field.year, field.month, field.day) |
|
1733 | text = "%04d-%02d-%02d" % (field.year, field.month, field.day) | |
1864 | else: |
|
1734 | else: | |
1865 | text = repr(field) |
|
1735 | text = repr(field) | |
1866 | return text |
|
1736 | return text | |
1867 |
|
1737 | |||
1868 |
|
1738 | |||
1869 | class Display(object): |
|
1739 | class Display(object): | |
1870 | class __metaclass__(type): |
|
1740 | class __metaclass__(type): | |
1871 | def __ror__(self, input): |
|
1741 | def __ror__(self, input): | |
1872 | return input | self() |
|
1742 | return input | self() | |
1873 |
|
1743 | |||
1874 | def __ror__(self, input): |
|
1744 | def __ror__(self, input): | |
1875 | self.input = input |
|
1745 | self.input = input | |
1876 | return self |
|
1746 | return self | |
1877 |
|
1747 | |||
1878 | def display(self): |
|
1748 | def display(self): | |
1879 | pass |
|
1749 | pass | |
1880 |
|
1750 | |||
1881 |
|
1751 | |||
1882 | class iless(Display): |
|
1752 | class iless(Display): | |
1883 | cmd = "less --quit-if-one-screen --LONG-PROMPT --LINE-NUMBERS --chop-long-lines --shift=8 --RAW-CONTROL-CHARS" |
|
1753 | cmd = "less --quit-if-one-screen --LONG-PROMPT --LINE-NUMBERS --chop-long-lines --shift=8 --RAW-CONTROL-CHARS" | |
1884 |
|
1754 | |||
1885 | def display(self): |
|
1755 | def display(self): | |
1886 | try: |
|
1756 | try: | |
1887 | pager = os.popen(self.cmd, "w") |
|
1757 | pager = os.popen(self.cmd, "w") | |
1888 | try: |
|
1758 | try: | |
1889 | for item in xiter(self.input, "default"): |
|
1759 | for item in xiter(self.input, "default"): | |
1890 | attrs = tuple(_upgradexattrs(item, "default")) |
|
1760 | attrs = tuple(_upgradexattrs(item, "default")) | |
1891 | attrs = ["%s=%s" % (a.name(item), a.value(item)) for a in attrs] |
|
1761 | attrs = ["%s=%s" % (a.name(item), a.value(item)) for a in attrs] | |
1892 | pager.write(" ".join(attrs)) |
|
1762 | pager.write(" ".join(attrs)) | |
1893 | pager.write("\n") |
|
1763 | pager.write("\n") | |
1894 | finally: |
|
1764 | finally: | |
1895 | pager.close() |
|
1765 | pager.close() | |
1896 | except Exception, exc: |
|
1766 | except Exception, exc: | |
1897 | print "%s: %s" % (exc.__class__.__name__, str(exc)) |
|
1767 | print "%s: %s" % (exc.__class__.__name__, str(exc)) | |
1898 |
|
1768 | |||
1899 |
|
1769 | |||
1900 | def xformat(value, mode, maxlength): |
|
1770 | def xformat(value, mode, maxlength): | |
1901 | align = None |
|
1771 | align = None | |
1902 | full = True |
|
1772 | full = True | |
1903 | width = 0 |
|
1773 | width = 0 | |
1904 | text = astyle.Text() |
|
1774 | text = astyle.Text() | |
1905 | for (style, part) in xrepr(value, mode): |
|
1775 | for (style, part) in xrepr(value, mode): | |
1906 | # only consider the first result |
|
1776 | # only consider the first result | |
1907 | if align is None: |
|
1777 | if align is None: | |
1908 | if isinstance(style, int): |
|
1778 | if isinstance(style, int): | |
1909 | # (style, text) really is (alignment, stop) |
|
1779 | # (style, text) really is (alignment, stop) | |
1910 | align = style |
|
1780 | align = style | |
1911 | full = part |
|
1781 | full = part | |
1912 | continue |
|
1782 | continue | |
1913 | else: |
|
1783 | else: | |
1914 | align = -1 |
|
1784 | align = -1 | |
1915 | full = True |
|
1785 | full = True | |
1916 | if not isinstance(style, int): |
|
1786 | if not isinstance(style, int): | |
1917 | text.append((style, part)) |
|
1787 | text.append((style, part)) | |
1918 | width += len(part) |
|
1788 | width += len(part) | |
1919 | if width >= maxlength and not full: |
|
1789 | if width >= maxlength and not full: | |
1920 | text.append((astyle.style_ellisis, "...")) |
|
1790 | text.append((astyle.style_ellisis, "...")) | |
1921 | width += 3 |
|
1791 | width += 3 | |
1922 | break |
|
1792 | break | |
1923 | if align is None: # default to left alignment |
|
1793 | if align is None: # default to left alignment | |
1924 | align = -1 |
|
1794 | align = -1 | |
1925 | return (align, width, text) |
|
1795 | return (align, width, text) | |
1926 |
|
1796 | |||
1927 |
|
1797 | |||
1928 | class idump(Display): |
|
1798 | class idump(Display): | |
1929 | # The approximate maximum length of a column entry |
|
1799 | # The approximate maximum length of a column entry | |
1930 | maxattrlength = 200 |
|
1800 | maxattrlength = 200 | |
1931 |
|
1801 | |||
1932 | # Style for column names |
|
1802 | # Style for column names | |
1933 | style_header = astyle.Style.fromstr("white:black:bold") |
|
1803 | style_header = astyle.Style.fromstr("white:black:bold") | |
1934 |
|
1804 | |||
1935 | def __init__(self, *attrs): |
|
1805 | def __init__(self, *attrs): | |
1936 | self.attrs = [upgradexattr(attr) for attr in attrs] |
|
1806 | self.attrs = [upgradexattr(attr) for attr in attrs] | |
1937 | self.headerpadchar = " " |
|
1807 | self.headerpadchar = " " | |
1938 | self.headersepchar = "|" |
|
1808 | self.headersepchar = "|" | |
1939 | self.datapadchar = " " |
|
1809 | self.datapadchar = " " | |
1940 | self.datasepchar = "|" |
|
1810 | self.datasepchar = "|" | |
1941 |
|
1811 | |||
1942 | def display(self): |
|
1812 | def display(self): | |
1943 | stream = genutils.Term.cout |
|
1813 | stream = genutils.Term.cout | |
1944 | allattrs = [] |
|
1814 | allattrs = [] | |
1945 | attrset = set() |
|
1815 | attrset = set() | |
1946 | colwidths = {} |
|
1816 | colwidths = {} | |
1947 | rows = [] |
|
1817 | rows = [] | |
1948 | for item in xiter(self.input, "default"): |
|
1818 | for item in xiter(self.input, "default"): | |
1949 | row = {} |
|
1819 | row = {} | |
1950 | attrs = self.attrs |
|
1820 | attrs = self.attrs | |
1951 | if not attrs: |
|
1821 | if not attrs: | |
1952 | attrs = xattrs(item, "default") |
|
1822 | attrs = xattrs(item, "default") | |
1953 | for attr in attrs: |
|
1823 | for attr in attrs: | |
1954 | if attr not in attrset: |
|
1824 | if attr not in attrset: | |
1955 | allattrs.append(attr) |
|
1825 | allattrs.append(attr) | |
1956 | attrset.add(attr) |
|
1826 | attrset.add(attr) | |
1957 | colwidths[attr] = len(attr.name()) |
|
1827 | colwidths[attr] = len(attr.name()) | |
1958 | try: |
|
1828 | try: | |
1959 | value = attr.value(item) |
|
1829 | value = attr.value(item) | |
1960 | except (KeyboardInterrupt, SystemExit): |
|
1830 | except (KeyboardInterrupt, SystemExit): | |
1961 | raise |
|
1831 | raise | |
1962 | except Exception, exc: |
|
1832 | except Exception, exc: | |
1963 | value = exc |
|
1833 | value = exc | |
1964 | (align, width, text) = xformat(value, "cell", self.maxattrlength) |
|
1834 | (align, width, text) = xformat(value, "cell", self.maxattrlength) | |
1965 | colwidths[attr] = max(colwidths[attr], width) |
|
1835 | colwidths[attr] = max(colwidths[attr], width) | |
1966 | # remember alignment, length and colored parts |
|
1836 | # remember alignment, length and colored parts | |
1967 | row[attr] = (align, width, text) |
|
1837 | row[attr] = (align, width, text) | |
1968 | rows.append(row) |
|
1838 | rows.append(row) | |
1969 |
|
1839 | |||
1970 | stream.write("\n") |
|
1840 | stream.write("\n") | |
1971 | for (i, attr) in enumerate(allattrs): |
|
1841 | for (i, attr) in enumerate(allattrs): | |
1972 | attrname = attr.name() |
|
1842 | attrname = attr.name() | |
1973 | self.style_header(attrname).write(stream) |
|
1843 | self.style_header(attrname).write(stream) | |
1974 | spc = colwidths[attr] - len(attrname) |
|
1844 | spc = colwidths[attr] - len(attrname) | |
1975 | if i < len(colwidths)-1: |
|
1845 | if i < len(colwidths)-1: | |
1976 | stream.write(self.headerpadchar*spc) |
|
1846 | stream.write(self.headerpadchar*spc) | |
1977 | stream.write(self.headersepchar) |
|
1847 | stream.write(self.headersepchar) | |
1978 | stream.write("\n") |
|
1848 | stream.write("\n") | |
1979 |
|
1849 | |||
1980 | for row in rows: |
|
1850 | for row in rows: | |
1981 | for (i, attr) in enumerate(allattrs): |
|
1851 | for (i, attr) in enumerate(allattrs): | |
1982 | (align, width, text) = row[attr] |
|
1852 | (align, width, text) = row[attr] | |
1983 | spc = colwidths[attr] - width |
|
1853 | spc = colwidths[attr] - width | |
1984 | if align == -1: |
|
1854 | if align == -1: | |
1985 | text.write(stream) |
|
1855 | text.write(stream) | |
1986 | if i < len(colwidths)-1: |
|
1856 | if i < len(colwidths)-1: | |
1987 | stream.write(self.datapadchar*spc) |
|
1857 | stream.write(self.datapadchar*spc) | |
1988 | elif align == 0: |
|
1858 | elif align == 0: | |
1989 | spc = colwidths[attr] - width |
|
1859 | spc = colwidths[attr] - width | |
1990 | spc1 = spc//2 |
|
1860 | spc1 = spc//2 | |
1991 | spc2 = spc-spc1 |
|
1861 | spc2 = spc-spc1 | |
1992 | stream.write(self.datapadchar*spc1) |
|
1862 | stream.write(self.datapadchar*spc1) | |
1993 | text.write(stream) |
|
1863 | text.write(stream) | |
1994 | if i < len(colwidths)-1: |
|
1864 | if i < len(colwidths)-1: | |
1995 | stream.write(self.datapadchar*spc2) |
|
1865 | stream.write(self.datapadchar*spc2) | |
1996 | else: |
|
1866 | else: | |
1997 | stream.write(self.datapadchar*spc) |
|
1867 | stream.write(self.datapadchar*spc) | |
1998 | text.write(stream) |
|
1868 | text.write(stream) | |
1999 | if i < len(colwidths)-1: |
|
1869 | if i < len(colwidths)-1: | |
2000 | stream.write(self.datasepchar) |
|
1870 | stream.write(self.datasepchar) | |
2001 | stream.write("\n") |
|
1871 | stream.write("\n") | |
2002 |
|
1872 | |||
2003 |
|
1873 | |||
2004 | class XMode(object): |
|
1874 | class XMode(object): | |
2005 | """ |
|
1875 | """ | |
2006 | An ``XMode`` object describes one enter mode available for an object |
|
1876 | An ``XMode`` object describes one enter mode available for an object | |
2007 | """ |
|
1877 | """ | |
2008 | def __init__(self, object, mode, title=None, description=None): |
|
1878 | def __init__(self, object, mode, title=None, description=None): | |
2009 | """ |
|
1879 | """ | |
2010 | Create a new ``XMode`` object for the object ``object``. This object |
|
1880 | Create a new ``XMode`` object for the object ``object``. This object | |
2011 | must support the enter mode ``mode`` (i.e. ``object.__xiter__(mode)`` |
|
1881 | must support the enter mode ``mode`` (i.e. ``object.__xiter__(mode)`` | |
2012 | must return an iterable). ``title`` and ``description`` will be |
|
1882 | must return an iterable). ``title`` and ``description`` will be | |
2013 | displayed in the browser when selecting among the available modes. |
|
1883 | displayed in the browser when selecting among the available modes. | |
2014 | """ |
|
1884 | """ | |
2015 | self.object = object |
|
1885 | self.object = object | |
2016 | self.mode = mode |
|
1886 | self.mode = mode | |
2017 | self.title = title |
|
1887 | self.title = title | |
2018 | self.description = description |
|
1888 | self.description = description | |
2019 |
|
1889 | |||
2020 | def __repr__(self): |
|
1890 | def __repr__(self): | |
2021 | return "<%s.%s object mode=%r at 0x%x>" % \ |
|
1891 | return "<%s.%s object mode=%r at 0x%x>" % \ | |
2022 | (self.__class__.__module__, self.__class__.__name__, |
|
1892 | (self.__class__.__module__, self.__class__.__name__, | |
2023 | self.mode, id(self)) |
|
1893 | self.mode, id(self)) | |
2024 |
|
1894 | |||
2025 | def __xrepr__(self, mode): |
|
1895 | def __xrepr__(self, mode): | |
2026 | if mode == "header" or mode == "footer": |
|
1896 | if mode == "header" or mode == "footer": | |
2027 | yield (astyle.style_default, self.title) |
|
1897 | yield (astyle.style_default, self.title) | |
2028 | else: |
|
1898 | else: | |
2029 | yield (astyle.style_default, repr(self)) |
|
1899 | yield (astyle.style_default, repr(self)) | |
2030 |
|
1900 | |||
2031 | def __xattrs__(self, mode): |
|
1901 | def __xattrs__(self, mode): | |
2032 | if mode == "detail": |
|
1902 | if mode == "detail": | |
2033 | return ("object", "mode") |
|
1903 | return ("object", "mode") | |
2034 | else: |
|
1904 | else: | |
2035 | return ("object", "mode", "title", "description") |
|
1905 | return ("object", "mode", "title", "description") | |
2036 |
|
1906 | |||
2037 | def __xiter__(self, mode): |
|
1907 | def __xiter__(self, mode): | |
2038 | return xiter(self.object, self.mode) |
|
1908 | return xiter(self.object, self.mode) | |
2039 |
|
1909 | |||
2040 |
|
1910 | |||
2041 | class AttributeDetail(Table): |
|
1911 | class AttributeDetail(Table): | |
2042 | def __init__(self, object, descriptor): |
|
1912 | def __init__(self, object, descriptor): | |
2043 | self.object = object |
|
1913 | self.object = object | |
2044 | self.descriptor = descriptor |
|
1914 | self.descriptor = descriptor | |
2045 |
|
1915 | |||
2046 | def __iter__(self): |
|
1916 | def __iter__(self): | |
2047 | return self.descriptor.iter(self.object) |
|
1917 | return self.descriptor.iter(self.object) | |
2048 |
|
1918 | |||
2049 | def name(self): |
|
1919 | def name(self): | |
2050 | return self.descriptor.name() |
|
1920 | return self.descriptor.name() | |
2051 |
|
1921 | |||
2052 | def attrtype(self): |
|
1922 | def attrtype(self): | |
2053 | return self.descriptor.attrtype(self.object) |
|
1923 | return self.descriptor.attrtype(self.object) | |
2054 |
|
1924 | |||
2055 | def valuetype(self): |
|
1925 | def valuetype(self): | |
2056 | return self.descriptor.valuetype(self.object) |
|
1926 | return self.descriptor.valuetype(self.object) | |
2057 |
|
1927 | |||
2058 | def doc(self): |
|
1928 | def doc(self): | |
2059 | return self.descriptor.doc(self.object) |
|
1929 | return self.descriptor.doc(self.object) | |
2060 |
|
1930 | |||
2061 | def shortdoc(self): |
|
1931 | def shortdoc(self): | |
2062 | return self.descriptor.shortdoc(self.object) |
|
1932 | return self.descriptor.shortdoc(self.object) | |
2063 |
|
1933 | |||
2064 | def value(self): |
|
1934 | def value(self): | |
2065 | return self.descriptor.value(self.object) |
|
1935 | return self.descriptor.value(self.object) | |
2066 |
|
1936 | |||
2067 | def __xattrs__(self, mode): |
|
1937 | def __xattrs__(self, mode): | |
2068 | attrs = ("name()", "attrtype()", "valuetype()", "value()", "shortdoc()") |
|
1938 | attrs = ("name()", "attrtype()", "valuetype()", "value()", "shortdoc()") | |
2069 | if mode == "detail": |
|
1939 | if mode == "detail": | |
2070 | attrs += ("doc()",) |
|
1940 | attrs += ("doc()",) | |
2071 | return attrs |
|
1941 | return attrs | |
2072 |
|
1942 | |||
2073 | def __xrepr__(self, mode): |
|
1943 | def __xrepr__(self, mode): | |
2074 | yield (-1, True) |
|
1944 | yield (-1, True) | |
2075 | yield (astyle.style_default, self.attrtype()) |
|
1945 | yield (astyle.style_default, self.attrtype()) | |
2076 | yield (astyle.style_default, "(") |
|
1946 | yield (astyle.style_default, "(") | |
2077 | for part in xrepr(self.valuetype()): |
|
1947 | for part in xrepr(self.valuetype()): | |
2078 | yield part |
|
1948 | yield part | |
2079 | yield (astyle.style_default, ") ") |
|
1949 | yield (astyle.style_default, ") ") | |
2080 | yield (astyle.style_default, self.name()) |
|
1950 | yield (astyle.style_default, self.name()) | |
2081 | yield (astyle.style_default, " of ") |
|
1951 | yield (astyle.style_default, " of ") | |
2082 | for part in xrepr(self.object): |
|
1952 | for part in xrepr(self.object): | |
2083 | yield part |
|
1953 | yield part | |
2084 |
|
1954 | |||
2085 |
|
1955 | |||
2086 | try: |
|
1956 | try: | |
2087 | from ibrowse import ibrowse |
|
1957 | from ibrowse import ibrowse | |
2088 | except ImportError: |
|
1958 | except ImportError: | |
2089 | # No curses (probably Windows) => use ``idump`` as the default display. |
|
1959 | # No curses (probably Windows) => use ``idump`` as the default display. | |
2090 | defaultdisplay = idump |
|
1960 | defaultdisplay = idump | |
2091 | else: |
|
1961 | else: | |
2092 | defaultdisplay = ibrowse |
|
1962 | defaultdisplay = ibrowse | |
2093 | __all__.append("ibrowse") |
|
1963 | __all__.append("ibrowse") | |
2094 |
|
1964 | |||
2095 |
|
1965 | |||
2096 | # If we're running under IPython, install an IPython displayhook that |
|
1966 | # If we're running under IPython, install an IPython displayhook that | |
2097 | # returns the object from Display.display(), else install a displayhook |
|
1967 | # returns the object from Display.display(), else install a displayhook | |
2098 | # directly as sys.displayhook |
|
1968 | # directly as sys.displayhook | |
2099 | api = None |
|
1969 | api = None | |
2100 | if ipapi is not None: |
|
1970 | if ipapi is not None: | |
2101 | try: |
|
1971 | try: | |
2102 | api = ipapi.get() |
|
1972 | api = ipapi.get() | |
2103 | except AttributeError: |
|
1973 | except AttributeError: | |
2104 | pass |
|
1974 | pass | |
2105 |
|
1975 | |||
2106 | if api is not None: |
|
1976 | if api is not None: | |
2107 | def displayhook(self, obj): |
|
1977 | def displayhook(self, obj): | |
2108 | if isinstance(obj, type) and issubclass(obj, Table): |
|
1978 | if isinstance(obj, type) and issubclass(obj, Table): | |
2109 | obj = obj() |
|
1979 | obj = obj() | |
2110 | if isinstance(obj, Table): |
|
1980 | if isinstance(obj, Table): | |
2111 | obj = obj | defaultdisplay |
|
1981 | obj = obj | defaultdisplay | |
2112 | if isinstance(obj, Display): |
|
1982 | if isinstance(obj, Display): | |
2113 | return obj.display() |
|
1983 | return obj.display() | |
2114 | else: |
|
1984 | else: | |
2115 | raise ipapi.TryNext |
|
1985 | raise ipapi.TryNext | |
2116 | api.set_hook("result_display", displayhook) |
|
1986 | api.set_hook("result_display", displayhook) | |
2117 | else: |
|
1987 | else: | |
2118 | def installdisplayhook(): |
|
1988 | def installdisplayhook(): | |
2119 | _originalhook = sys.displayhook |
|
1989 | _originalhook = sys.displayhook | |
2120 | def displayhook(obj): |
|
1990 | def displayhook(obj): | |
2121 | if isinstance(obj, type) and issubclass(obj, Table): |
|
1991 | if isinstance(obj, type) and issubclass(obj, Table): | |
2122 | obj = obj() |
|
1992 | obj = obj() | |
2123 | if isinstance(obj, Table): |
|
1993 | if isinstance(obj, Table): | |
2124 | obj = obj | defaultdisplay |
|
1994 | obj = obj | defaultdisplay | |
2125 | if isinstance(obj, Display): |
|
1995 | if isinstance(obj, Display): | |
2126 | return obj.display() |
|
1996 | return obj.display() | |
2127 | else: |
|
1997 | else: | |
2128 | _originalhook(obj) |
|
1998 | _originalhook(obj) | |
2129 | sys.displayhook = displayhook |
|
1999 | sys.displayhook = displayhook | |
2130 | installdisplayhook() |
|
2000 | installdisplayhook() |
@@ -1,5800 +1,5806 b'' | |||||
|
1 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> | |||
|
2 | ||||
|
3 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that | |||
|
4 | call the base class method and propagate the return value to | |||
|
5 | ifile. This is now done by path itself. | |||
|
6 | ||||
1 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
7 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
2 |
|
8 | |||
3 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public |
|
9 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public | |
4 | api: set_crash_handler(), to expose the ability to change the |
|
10 | api: set_crash_handler(), to expose the ability to change the | |
5 | internal crash handler. |
|
11 | internal crash handler. | |
6 |
|
12 | |||
7 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out |
|
13 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out | |
8 | the various parameters of the crash handler so that apps using |
|
14 | the various parameters of the crash handler so that apps using | |
9 | IPython as their engine can customize crash handling. Ipmlemented |
|
15 | IPython as their engine can customize crash handling. Ipmlemented | |
10 | at the request of SAGE. |
|
16 | at the request of SAGE. | |
11 |
|
17 | |||
12 | 2006-10-14 Ville Vainio <vivainio@gmail.com> |
|
18 | 2006-10-14 Ville Vainio <vivainio@gmail.com> | |
13 |
|
19 | |||
14 | * Magic.py, ipython.el: applied first "safe" part of Rocky |
|
20 | * Magic.py, ipython.el: applied first "safe" part of Rocky | |
15 | Bernstein's patch set for pydb integration. |
|
21 | Bernstein's patch set for pydb integration. | |
16 |
|
22 | |||
17 | * Magic.py (%unalias, %alias): %store'd aliases can now be |
|
23 | * Magic.py (%unalias, %alias): %store'd aliases can now be | |
18 | removed with '%unalias'. %alias w/o args now shows most |
|
24 | removed with '%unalias'. %alias w/o args now shows most | |
19 | interesting (stored / manually defined) aliases last |
|
25 | interesting (stored / manually defined) aliases last | |
20 | where they catch the eye w/o scrolling. |
|
26 | where they catch the eye w/o scrolling. | |
21 |
|
27 | |||
22 | * Magic.py (%rehashx), ext_rehashdir.py: files with |
|
28 | * Magic.py (%rehashx), ext_rehashdir.py: files with | |
23 | 'py' extension are always considered executable, even |
|
29 | 'py' extension are always considered executable, even | |
24 | when not in PATHEXT environment variable. |
|
30 | when not in PATHEXT environment variable. | |
25 |
|
31 | |||
26 | 2006-10-12 Ville Vainio <vivainio@gmail.com> |
|
32 | 2006-10-12 Ville Vainio <vivainio@gmail.com> | |
27 |
|
33 | |||
28 | * jobctrl.py: Add new "jobctrl" extension for spawning background |
|
34 | * jobctrl.py: Add new "jobctrl" extension for spawning background | |
29 | processes with "&find /". 'import jobctrl' to try it out. Requires |
|
35 | processes with "&find /". 'import jobctrl' to try it out. Requires | |
30 | 'subprocess' module, standard in python 2.4+. |
|
36 | 'subprocess' module, standard in python 2.4+. | |
31 |
|
37 | |||
32 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, |
|
38 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, | |
33 | so if foo -> bar and bar -> baz, then foo -> baz. |
|
39 | so if foo -> bar and bar -> baz, then foo -> baz. | |
34 |
|
40 | |||
35 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
41 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
36 |
|
42 | |||
37 | * IPython/Magic.py (Magic.parse_options): add a new posix option |
|
43 | * IPython/Magic.py (Magic.parse_options): add a new posix option | |
38 | to allow parsing of input args in magics that doesn't strip quotes |
|
44 | to allow parsing of input args in magics that doesn't strip quotes | |
39 | (if posix=False). This also closes %timeit bug reported by |
|
45 | (if posix=False). This also closes %timeit bug reported by | |
40 | Stefan. |
|
46 | Stefan. | |
41 |
|
47 | |||
42 | 2006-10-03 Ville Vainio <vivainio@gmail.com> |
|
48 | 2006-10-03 Ville Vainio <vivainio@gmail.com> | |
43 |
|
49 | |||
44 | * iplib.py (raw_input, interact): Return ValueError catching for |
|
50 | * iplib.py (raw_input, interact): Return ValueError catching for | |
45 | raw_input. Fixes infinite loop for sys.stdin.close() or |
|
51 | raw_input. Fixes infinite loop for sys.stdin.close() or | |
46 | sys.stdout.close(). |
|
52 | sys.stdout.close(). | |
47 |
|
53 | |||
48 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
54 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
49 |
|
55 | |||
50 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes |
|
56 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes | |
51 | to help in handling doctests. irunner is now pretty useful for |
|
57 | to help in handling doctests. irunner is now pretty useful for | |
52 | running standalone scripts and simulate a full interactive session |
|
58 | running standalone scripts and simulate a full interactive session | |
53 | in a format that can be then pasted as a doctest. |
|
59 | in a format that can be then pasted as a doctest. | |
54 |
|
60 | |||
55 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit |
|
61 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit | |
56 | on top of the default (useless) ones. This also fixes the nasty |
|
62 | on top of the default (useless) ones. This also fixes the nasty | |
57 | way in which 2.5's Quitter() exits (reverted [1785]). |
|
63 | way in which 2.5's Quitter() exits (reverted [1785]). | |
58 |
|
64 | |||
59 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python |
|
65 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python | |
60 | 2.5. |
|
66 | 2.5. | |
61 |
|
67 | |||
62 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb |
|
68 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb | |
63 | color scheme is updated as well when color scheme is changed |
|
69 | color scheme is updated as well when color scheme is changed | |
64 | interactively. |
|
70 | interactively. | |
65 |
|
71 | |||
66 | 2006-09-27 Ville Vainio <vivainio@gmail.com> |
|
72 | 2006-09-27 Ville Vainio <vivainio@gmail.com> | |
67 |
|
73 | |||
68 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid |
|
74 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid | |
69 | infinite loop and just exit. It's a hack, but will do for a while. |
|
75 | infinite loop and just exit. It's a hack, but will do for a while. | |
70 |
|
76 | |||
71 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> |
|
77 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> | |
72 |
|
78 | |||
73 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to |
|
79 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to | |
74 | the constructor, this makes it possible to get a list of only directories |
|
80 | the constructor, this makes it possible to get a list of only directories | |
75 | or only files. |
|
81 | or only files. | |
76 |
|
82 | |||
77 | 2006-08-12 Ville Vainio <vivainio@gmail.com> |
|
83 | 2006-08-12 Ville Vainio <vivainio@gmail.com> | |
78 |
|
84 | |||
79 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, |
|
85 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, | |
80 | they broke unittest |
|
86 | they broke unittest | |
81 |
|
87 | |||
82 | 2006-08-11 Ville Vainio <vivainio@gmail.com> |
|
88 | 2006-08-11 Ville Vainio <vivainio@gmail.com> | |
83 |
|
89 | |||
84 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch |
|
90 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch | |
85 | by resolving issue properly, i.e. by inheriting FakeModule |
|
91 | by resolving issue properly, i.e. by inheriting FakeModule | |
86 | from types.ModuleType. Pickling ipython interactive data |
|
92 | from types.ModuleType. Pickling ipython interactive data | |
87 | should still work as usual (testing appreciated). |
|
93 | should still work as usual (testing appreciated). | |
88 |
|
94 | |||
89 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
95 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
90 |
|
96 | |||
91 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if |
|
97 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if | |
92 | running under python 2.3 with code from 2.4 to fix a bug with |
|
98 | running under python 2.3 with code from 2.4 to fix a bug with | |
93 | help(). Reported by the Debian maintainers, Norbert Tretkowski |
|
99 | help(). Reported by the Debian maintainers, Norbert Tretkowski | |
94 | <norbert-AT-tretkowski.de> and Alexandre Fayolle |
|
100 | <norbert-AT-tretkowski.de> and Alexandre Fayolle | |
95 | <afayolle-AT-debian.org>. |
|
101 | <afayolle-AT-debian.org>. | |
96 |
|
102 | |||
97 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> |
|
103 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> | |
98 |
|
104 | |||
99 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer |
|
105 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer | |
100 | (which was displaying "quit" twice). |
|
106 | (which was displaying "quit" twice). | |
101 |
|
107 | |||
102 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> |
|
108 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> | |
103 |
|
109 | |||
104 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using |
|
110 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using | |
105 | the mode argument). |
|
111 | the mode argument). | |
106 |
|
112 | |||
107 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> |
|
113 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> | |
108 |
|
114 | |||
109 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're |
|
115 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're | |
110 | not running under IPython. |
|
116 | not running under IPython. | |
111 |
|
117 | |||
112 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail |
|
118 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail | |
113 | and make it iterable (iterating over the attribute itself). Add two new |
|
119 | and make it iterable (iterating over the attribute itself). Add two new | |
114 | magic strings for __xattrs__(): If the string starts with "-", the attribute |
|
120 | magic strings for __xattrs__(): If the string starts with "-", the attribute | |
115 | will not be displayed in ibrowse's detail view (but it can still be |
|
121 | will not be displayed in ibrowse's detail view (but it can still be | |
116 | iterated over). This makes it possible to add attributes that are large |
|
122 | iterated over). This makes it possible to add attributes that are large | |
117 | lists or generator methods to the detail view. Replace magic attribute names |
|
123 | lists or generator methods to the detail view. Replace magic attribute names | |
118 | and _attrname() and _getattr() with "descriptors": For each type of magic |
|
124 | and _attrname() and _getattr() with "descriptors": For each type of magic | |
119 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); |
|
125 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); | |
120 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); |
|
126 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); | |
121 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); |
|
127 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); | |
122 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() |
|
128 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() | |
123 | are still supported. |
|
129 | are still supported. | |
124 |
|
130 | |||
125 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input |
|
131 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input | |
126 | fails in ibrowse.fetch(), the exception object is added as the last item |
|
132 | fails in ibrowse.fetch(), the exception object is added as the last item | |
127 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. |
|
133 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. | |
128 | a generator throws an exception midway through execution. |
|
134 | a generator throws an exception midway through execution. | |
129 |
|
135 | |||
130 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and |
|
136 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and | |
131 | encoding into methods. |
|
137 | encoding into methods. | |
132 |
|
138 | |||
133 | 2006-07-26 Ville Vainio <vivainio@gmail.com> |
|
139 | 2006-07-26 Ville Vainio <vivainio@gmail.com> | |
134 |
|
140 | |||
135 | * iplib.py: history now stores multiline input as single |
|
141 | * iplib.py: history now stores multiline input as single | |
136 | history entries. Patch by Jorgen Cederlof. |
|
142 | history entries. Patch by Jorgen Cederlof. | |
137 |
|
143 | |||
138 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> |
|
144 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> | |
139 |
|
145 | |||
140 | * IPython/Extensions/ibrowse.py: Make cursor visible over |
|
146 | * IPython/Extensions/ibrowse.py: Make cursor visible over | |
141 | non existing attributes. |
|
147 | non existing attributes. | |
142 |
|
148 | |||
143 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> |
|
149 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> | |
144 |
|
150 | |||
145 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the |
|
151 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the | |
146 | error output of the running command doesn't mess up the screen. |
|
152 | error output of the running command doesn't mess up the screen. | |
147 |
|
153 | |||
148 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> |
|
154 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> | |
149 |
|
155 | |||
150 | * IPython/Extensions/ipipe.py (isort): Make isort usable without |
|
156 | * IPython/Extensions/ipipe.py (isort): Make isort usable without | |
151 | argument. This sorts the items themselves. |
|
157 | argument. This sorts the items themselves. | |
152 |
|
158 | |||
153 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> |
|
159 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> | |
154 |
|
160 | |||
155 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): |
|
161 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): | |
156 | Compile expression strings into code objects. This should speed |
|
162 | Compile expression strings into code objects. This should speed | |
157 | up ifilter and friends somewhat. |
|
163 | up ifilter and friends somewhat. | |
158 |
|
164 | |||
159 | 2006-07-08 Ville Vainio <vivainio@gmail.com> |
|
165 | 2006-07-08 Ville Vainio <vivainio@gmail.com> | |
160 |
|
166 | |||
161 | * Magic.py: %cpaste now strips > from the beginning of lines |
|
167 | * Magic.py: %cpaste now strips > from the beginning of lines | |
162 | to ease pasting quoted code from emails. Contributed by |
|
168 | to ease pasting quoted code from emails. Contributed by | |
163 | Stefan van der Walt. |
|
169 | Stefan van der Walt. | |
164 |
|
170 | |||
165 | 2006-06-29 Ville Vainio <vivainio@gmail.com> |
|
171 | 2006-06-29 Ville Vainio <vivainio@gmail.com> | |
166 |
|
172 | |||
167 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab |
|
173 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab | |
168 | mode, patch contributed by Darren Dale. NEEDS TESTING! |
|
174 | mode, patch contributed by Darren Dale. NEEDS TESTING! | |
169 |
|
175 | |||
170 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> |
|
176 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> | |
171 |
|
177 | |||
172 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row |
|
178 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row | |
173 | a blue background. Fix fetching new display rows when the browser |
|
179 | a blue background. Fix fetching new display rows when the browser | |
174 | scrolls more than a screenful (e.g. by using the goto command). |
|
180 | scrolls more than a screenful (e.g. by using the goto command). | |
175 |
|
181 | |||
176 | 2006-06-27 Ville Vainio <vivainio@gmail.com> |
|
182 | 2006-06-27 Ville Vainio <vivainio@gmail.com> | |
177 |
|
183 | |||
178 | * Magic.py (_inspect, _ofind) Apply David Huard's |
|
184 | * Magic.py (_inspect, _ofind) Apply David Huard's | |
179 | patch for displaying the correct docstring for 'property' |
|
185 | patch for displaying the correct docstring for 'property' | |
180 | attributes. |
|
186 | attributes. | |
181 |
|
187 | |||
182 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> |
|
188 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> | |
183 |
|
189 | |||
184 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard |
|
190 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard | |
185 | commands into the methods implementing them. |
|
191 | commands into the methods implementing them. | |
186 |
|
192 | |||
187 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
193 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
188 |
|
194 | |||
189 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted |
|
195 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted | |
190 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original |
|
196 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original | |
191 | autoindent support was authored by Jin Liu. |
|
197 | autoindent support was authored by Jin Liu. | |
192 |
|
198 | |||
193 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> |
|
199 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> | |
194 |
|
200 | |||
195 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used |
|
201 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used | |
196 | for keymaps with a custom class that simplifies handling. |
|
202 | for keymaps with a custom class that simplifies handling. | |
197 |
|
203 | |||
198 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> |
|
204 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> | |
199 |
|
205 | |||
200 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal |
|
206 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal | |
201 | resizing. This requires Python 2.5 to work. |
|
207 | resizing. This requires Python 2.5 to work. | |
202 |
|
208 | |||
203 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> |
|
209 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> | |
204 |
|
210 | |||
205 | * IPython/Extensions/ibrowse.py: Add two new commands to |
|
211 | * IPython/Extensions/ibrowse.py: Add two new commands to | |
206 | ibrowse: "hideattr" (mapped to "h") hides the attribute under |
|
212 | ibrowse: "hideattr" (mapped to "h") hides the attribute under | |
207 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden |
|
213 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden | |
208 | attributes again. Remapped the help command to "?". Display |
|
214 | attributes again. Remapped the help command to "?". Display | |
209 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e |
|
215 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e | |
210 | as keys for the "home" and "end" commands. Add three new commands |
|
216 | as keys for the "home" and "end" commands. Add three new commands | |
211 | to the input mode for "find" and friends: "delend" (CTRL-K) |
|
217 | to the input mode for "find" and friends: "delend" (CTRL-K) | |
212 | deletes to the end of line. "incsearchup" searches upwards in the |
|
218 | deletes to the end of line. "incsearchup" searches upwards in the | |
213 | command history for an input that starts with the text before the cursor. |
|
219 | command history for an input that starts with the text before the cursor. | |
214 | "incsearchdown" does the same downwards. Removed a bogus mapping of |
|
220 | "incsearchdown" does the same downwards. Removed a bogus mapping of | |
215 | the x key to "delete". |
|
221 | the x key to "delete". | |
216 |
|
222 | |||
217 | 2006-06-15 Ville Vainio <vivainio@gmail.com> |
|
223 | 2006-06-15 Ville Vainio <vivainio@gmail.com> | |
218 |
|
224 | |||
219 | * iplib.py, hooks.py: Added new generate_prompt hook that can be |
|
225 | * iplib.py, hooks.py: Added new generate_prompt hook that can be | |
220 | used to create prompts dynamically, instead of the "old" way of |
|
226 | used to create prompts dynamically, instead of the "old" way of | |
221 | assigning "magic" strings to prompt_in1 and prompt_in2. The old |
|
227 | assigning "magic" strings to prompt_in1 and prompt_in2. The old | |
222 | way still works (it's invoked by the default hook), of course. |
|
228 | way still works (it's invoked by the default hook), of course. | |
223 |
|
229 | |||
224 | * Prompts.py: added generate_output_prompt hook for altering output |
|
230 | * Prompts.py: added generate_output_prompt hook for altering output | |
225 | prompt |
|
231 | prompt | |
226 |
|
232 | |||
227 | * Release.py: Changed version string to 0.7.3.svn. |
|
233 | * Release.py: Changed version string to 0.7.3.svn. | |
228 |
|
234 | |||
229 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> |
|
235 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> | |
230 |
|
236 | |||
231 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that |
|
237 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that | |
232 | the call to fetch() always tries to fetch enough data for at least one |
|
238 | the call to fetch() always tries to fetch enough data for at least one | |
233 | full screen. This makes it possible to simply call moveto(0,0,True) in |
|
239 | full screen. This makes it possible to simply call moveto(0,0,True) in | |
234 | the constructor. Fix typos and removed the obsolete goto attribute. |
|
240 | the constructor. Fix typos and removed the obsolete goto attribute. | |
235 |
|
241 | |||
236 | 2006-06-12 Ville Vainio <vivainio@gmail.com> |
|
242 | 2006-06-12 Ville Vainio <vivainio@gmail.com> | |
237 |
|
243 | |||
238 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for |
|
244 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for | |
239 | allowing $variable interpolation within multiline statements, |
|
245 | allowing $variable interpolation within multiline statements, | |
240 | though so far only with "sh" profile for a testing period. |
|
246 | though so far only with "sh" profile for a testing period. | |
241 | The patch also enables splitting long commands with \ but it |
|
247 | The patch also enables splitting long commands with \ but it | |
242 | doesn't work properly yet. |
|
248 | doesn't work properly yet. | |
243 |
|
249 | |||
244 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> |
|
250 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> | |
245 |
|
251 | |||
246 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the |
|
252 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the | |
247 | input history and the position of the cursor in the input history for |
|
253 | input history and the position of the cursor in the input history for | |
248 | the find, findbackwards and goto command. |
|
254 | the find, findbackwards and goto command. | |
249 |
|
255 | |||
250 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> |
|
256 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> | |
251 |
|
257 | |||
252 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that |
|
258 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that | |
253 | implements the basic functionality of browser commands that require |
|
259 | implements the basic functionality of browser commands that require | |
254 | input. Reimplement the goto, find and findbackwards commands as |
|
260 | input. Reimplement the goto, find and findbackwards commands as | |
255 | subclasses of _CommandInput. Add an input history and keymaps to those |
|
261 | subclasses of _CommandInput. Add an input history and keymaps to those | |
256 | commands. Add "\r" as a keyboard shortcut for the enterdefault and |
|
262 | commands. Add "\r" as a keyboard shortcut for the enterdefault and | |
257 | execute commands. |
|
263 | execute commands. | |
258 |
|
264 | |||
259 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
265 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
260 |
|
266 | |||
261 | * iplib.py: ipython mybatch.ipy exits ipython immediately after |
|
267 | * iplib.py: ipython mybatch.ipy exits ipython immediately after | |
262 | running the batch files instead of leaving the session open. |
|
268 | running the batch files instead of leaving the session open. | |
263 |
|
269 | |||
264 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
270 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
265 |
|
271 | |||
266 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as |
|
272 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as | |
267 | the original fix was incomplete. Patch submitted by W. Maier. |
|
273 | the original fix was incomplete. Patch submitted by W. Maier. | |
268 |
|
274 | |||
269 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
275 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
270 |
|
276 | |||
271 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): |
|
277 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): | |
272 | Confirmation prompts can be supressed by 'quiet' option. |
|
278 | Confirmation prompts can be supressed by 'quiet' option. | |
273 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". |
|
279 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". | |
274 |
|
280 | |||
275 | 2006-06-06 *** Released version 0.7.2 |
|
281 | 2006-06-06 *** Released version 0.7.2 | |
276 |
|
282 | |||
277 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
283 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
278 |
|
284 | |||
279 | * IPython/Release.py (version): Made 0.7.2 final for release. |
|
285 | * IPython/Release.py (version): Made 0.7.2 final for release. | |
280 | Repo tagged and release cut. |
|
286 | Repo tagged and release cut. | |
281 |
|
287 | |||
282 | 2006-06-05 Ville Vainio <vivainio@gmail.com> |
|
288 | 2006-06-05 Ville Vainio <vivainio@gmail.com> | |
283 |
|
289 | |||
284 | * Magic.py (magic_rehashx): Honor no_alias list earlier in |
|
290 | * Magic.py (magic_rehashx): Honor no_alias list earlier in | |
285 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py |
|
291 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py | |
286 |
|
292 | |||
287 | * upgrade_dir.py: try import 'path' module a bit harder |
|
293 | * upgrade_dir.py: try import 'path' module a bit harder | |
288 | (for %upgrade) |
|
294 | (for %upgrade) | |
289 |
|
295 | |||
290 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
296 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
291 |
|
297 | |||
292 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer |
|
298 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer | |
293 | instead of looping 20 times. |
|
299 | instead of looping 20 times. | |
294 |
|
300 | |||
295 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag |
|
301 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag | |
296 | correctly at initialization time. Bug reported by Krishna Mohan |
|
302 | correctly at initialization time. Bug reported by Krishna Mohan | |
297 | Gundu <gkmohan-AT-gmail.com> on the user list. |
|
303 | Gundu <gkmohan-AT-gmail.com> on the user list. | |
298 |
|
304 | |||
299 | * IPython/Release.py (version): Mark 0.7.2 version to start |
|
305 | * IPython/Release.py (version): Mark 0.7.2 version to start | |
300 | testing for release on 06/06. |
|
306 | testing for release on 06/06. | |
301 |
|
307 | |||
302 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
308 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
303 |
|
309 | |||
304 | * scripts/irunner: thin script interface so users don't have to |
|
310 | * scripts/irunner: thin script interface so users don't have to | |
305 | find the module and call it as an executable, since modules rarely |
|
311 | find the module and call it as an executable, since modules rarely | |
306 | live in people's PATH. |
|
312 | live in people's PATH. | |
307 |
|
313 | |||
308 | * IPython/irunner.py (InteractiveRunner.__init__): added |
|
314 | * IPython/irunner.py (InteractiveRunner.__init__): added | |
309 | delaybeforesend attribute to control delays with newer versions of |
|
315 | delaybeforesend attribute to control delays with newer versions of | |
310 | pexpect. Thanks to detailed help from pexpect's author, Noah |
|
316 | pexpect. Thanks to detailed help from pexpect's author, Noah | |
311 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner |
|
317 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner | |
312 | correctly (it works in NoColor mode). |
|
318 | correctly (it works in NoColor mode). | |
313 |
|
319 | |||
314 | * IPython/iplib.py (handle_normal): fix nasty crash reported on |
|
320 | * IPython/iplib.py (handle_normal): fix nasty crash reported on | |
315 | SAGE list, from improper log() calls. |
|
321 | SAGE list, from improper log() calls. | |
316 |
|
322 | |||
317 | 2006-05-31 Ville Vainio <vivainio@gmail.com> |
|
323 | 2006-05-31 Ville Vainio <vivainio@gmail.com> | |
318 |
|
324 | |||
319 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir |
|
325 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir | |
320 | with args in parens to work correctly with dirs that have spaces. |
|
326 | with args in parens to work correctly with dirs that have spaces. | |
321 |
|
327 | |||
322 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
328 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
323 |
|
329 | |||
324 | * IPython/Logger.py (Logger.logstart): add option to log raw input |
|
330 | * IPython/Logger.py (Logger.logstart): add option to log raw input | |
325 | instead of the processed one. A -r flag was added to the |
|
331 | instead of the processed one. A -r flag was added to the | |
326 | %logstart magic used for controlling logging. |
|
332 | %logstart magic used for controlling logging. | |
327 |
|
333 | |||
328 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
334 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
329 |
|
335 | |||
330 | * IPython/iplib.py (InteractiveShell.__init__): add check for the |
|
336 | * IPython/iplib.py (InteractiveShell.__init__): add check for the | |
331 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't |
|
337 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't | |
332 | recognize the option. After a bug report by Will Maier. This |
|
338 | recognize the option. After a bug report by Will Maier. This | |
333 | closes #64 (will do it after confirmation from W. Maier). |
|
339 | closes #64 (will do it after confirmation from W. Maier). | |
334 |
|
340 | |||
335 | * IPython/irunner.py: New module to run scripts as if manually |
|
341 | * IPython/irunner.py: New module to run scripts as if manually | |
336 | typed into an interactive environment, based on pexpect. After a |
|
342 | typed into an interactive environment, based on pexpect. After a | |
337 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the |
|
343 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the | |
338 | ipython-user list. Simple unittests in the tests/ directory. |
|
344 | ipython-user list. Simple unittests in the tests/ directory. | |
339 |
|
345 | |||
340 | * tools/release: add Will Maier, OpenBSD port maintainer, to |
|
346 | * tools/release: add Will Maier, OpenBSD port maintainer, to | |
341 | recepients list. We are now officially part of the OpenBSD ports: |
|
347 | recepients list. We are now officially part of the OpenBSD ports: | |
342 | http://www.openbsd.org/ports.html ! Many thanks to Will for the |
|
348 | http://www.openbsd.org/ports.html ! Many thanks to Will for the | |
343 | work. |
|
349 | work. | |
344 |
|
350 | |||
345 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
351 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
346 |
|
352 | |||
347 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) |
|
353 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) | |
348 | so that it doesn't break tkinter apps. |
|
354 | so that it doesn't break tkinter apps. | |
349 |
|
355 | |||
350 | * IPython/iplib.py (_prefilter): fix bug where aliases would |
|
356 | * IPython/iplib.py (_prefilter): fix bug where aliases would | |
351 | shadow variables when autocall was fully off. Reported by SAGE |
|
357 | shadow variables when autocall was fully off. Reported by SAGE | |
352 | author William Stein. |
|
358 | author William Stein. | |
353 |
|
359 | |||
354 | * IPython/OInspect.py (Inspector.__init__): add a flag to control |
|
360 | * IPython/OInspect.py (Inspector.__init__): add a flag to control | |
355 | at what detail level strings are computed when foo? is requested. |
|
361 | at what detail level strings are computed when foo? is requested. | |
356 | This allows users to ask for example that the string form of an |
|
362 | This allows users to ask for example that the string form of an | |
357 | object is only computed when foo?? is called, or even never, by |
|
363 | object is only computed when foo?? is called, or even never, by | |
358 | setting the object_info_string_level >= 2 in the configuration |
|
364 | setting the object_info_string_level >= 2 in the configuration | |
359 | file. This new option has been added and documented. After a |
|
365 | file. This new option has been added and documented. After a | |
360 | request by SAGE to be able to control the printing of very large |
|
366 | request by SAGE to be able to control the printing of very large | |
361 | objects more easily. |
|
367 | objects more easily. | |
362 |
|
368 | |||
363 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
369 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
364 |
|
370 | |||
365 | * IPython/ipmaker.py (make_IPython): remove the ipython call path |
|
371 | * IPython/ipmaker.py (make_IPython): remove the ipython call path | |
366 | from sys.argv, to be 100% consistent with how Python itself works |
|
372 | from sys.argv, to be 100% consistent with how Python itself works | |
367 | (as seen for example with python -i file.py). After a bug report |
|
373 | (as seen for example with python -i file.py). After a bug report | |
368 | by Jeffrey Collins. |
|
374 | by Jeffrey Collins. | |
369 |
|
375 | |||
370 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix |
|
376 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix | |
371 | nasty bug which was preventing custom namespaces with -pylab, |
|
377 | nasty bug which was preventing custom namespaces with -pylab, | |
372 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab |
|
378 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab | |
373 | compatibility (long gone from mpl). |
|
379 | compatibility (long gone from mpl). | |
374 |
|
380 | |||
375 | * IPython/ipapi.py (make_session): name change: create->make. We |
|
381 | * IPython/ipapi.py (make_session): name change: create->make. We | |
376 | use make in other places (ipmaker,...), it's shorter and easier to |
|
382 | use make in other places (ipmaker,...), it's shorter and easier to | |
377 | type and say, etc. I'm trying to clean things before 0.7.2 so |
|
383 | type and say, etc. I'm trying to clean things before 0.7.2 so | |
378 | that I can keep things stable wrt to ipapi in the chainsaw branch. |
|
384 | that I can keep things stable wrt to ipapi in the chainsaw branch. | |
379 |
|
385 | |||
380 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that |
|
386 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that | |
381 | python-mode recognizes our debugger mode. Add support for |
|
387 | python-mode recognizes our debugger mode. Add support for | |
382 | autoindent inside (X)emacs. After a patch sent in by Jin Liu |
|
388 | autoindent inside (X)emacs. After a patch sent in by Jin Liu | |
383 | <m.liu.jin-AT-gmail.com> originally written by |
|
389 | <m.liu.jin-AT-gmail.com> originally written by | |
384 | doxgen-AT-newsmth.net (with minor modifications for xemacs |
|
390 | doxgen-AT-newsmth.net (with minor modifications for xemacs | |
385 | compatibility) |
|
391 | compatibility) | |
386 |
|
392 | |||
387 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of |
|
393 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of | |
388 | tracebacks when walking the stack so that the stack tracking system |
|
394 | tracebacks when walking the stack so that the stack tracking system | |
389 | in emacs' python-mode can identify the frames correctly. |
|
395 | in emacs' python-mode can identify the frames correctly. | |
390 |
|
396 | |||
391 | * IPython/ipmaker.py (make_IPython): make the internal (and |
|
397 | * IPython/ipmaker.py (make_IPython): make the internal (and | |
392 | default config) autoedit_syntax value false by default. Too many |
|
398 | default config) autoedit_syntax value false by default. Too many | |
393 | users have complained to me (both on and off-list) about problems |
|
399 | users have complained to me (both on and off-list) about problems | |
394 | with this option being on by default, so I'm making it default to |
|
400 | with this option being on by default, so I'm making it default to | |
395 | off. It can still be enabled by anyone via the usual mechanisms. |
|
401 | off. It can still be enabled by anyone via the usual mechanisms. | |
396 |
|
402 | |||
397 | * IPython/completer.py (Completer.attr_matches): add support for |
|
403 | * IPython/completer.py (Completer.attr_matches): add support for | |
398 | PyCrust-style _getAttributeNames magic method. Patch contributed |
|
404 | PyCrust-style _getAttributeNames magic method. Patch contributed | |
399 | by <mscott-AT-goldenspud.com>. Closes #50. |
|
405 | by <mscott-AT-goldenspud.com>. Closes #50. | |
400 |
|
406 | |||
401 | * IPython/iplib.py (InteractiveShell.__init__): remove the |
|
407 | * IPython/iplib.py (InteractiveShell.__init__): remove the | |
402 | deletion of exit/quit from __builtin__, which can break |
|
408 | deletion of exit/quit from __builtin__, which can break | |
403 | third-party tools like the Zope debugging console. The |
|
409 | third-party tools like the Zope debugging console. The | |
404 | %exit/%quit magics remain. In general, it's probably a good idea |
|
410 | %exit/%quit magics remain. In general, it's probably a good idea | |
405 | not to delete anything from __builtin__, since we never know what |
|
411 | not to delete anything from __builtin__, since we never know what | |
406 | that will break. In any case, python now (for 2.5) will support |
|
412 | that will break. In any case, python now (for 2.5) will support | |
407 | 'real' exit/quit, so this issue is moot. Closes #55. |
|
413 | 'real' exit/quit, so this issue is moot. Closes #55. | |
408 |
|
414 | |||
409 | * IPython/genutils.py (with_obj): rename the 'with' function to |
|
415 | * IPython/genutils.py (with_obj): rename the 'with' function to | |
410 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' |
|
416 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' | |
411 | becomes a language keyword. Closes #53. |
|
417 | becomes a language keyword. Closes #53. | |
412 |
|
418 | |||
413 | * IPython/FakeModule.py (FakeModule.__init__): add a proper |
|
419 | * IPython/FakeModule.py (FakeModule.__init__): add a proper | |
414 | __file__ attribute to this so it fools more things into thinking |
|
420 | __file__ attribute to this so it fools more things into thinking | |
415 | it is a real module. Closes #59. |
|
421 | it is a real module. Closes #59. | |
416 |
|
422 | |||
417 | * IPython/Magic.py (magic_edit): add -n option to open the editor |
|
423 | * IPython/Magic.py (magic_edit): add -n option to open the editor | |
418 | at a specific line number. After a patch by Stefan van der Walt. |
|
424 | at a specific line number. After a patch by Stefan van der Walt. | |
419 |
|
425 | |||
420 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
426 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
421 |
|
427 | |||
422 | * IPython/iplib.py (edit_syntax_error): fix crash when for some |
|
428 | * IPython/iplib.py (edit_syntax_error): fix crash when for some | |
423 | reason the file could not be opened. After automatic crash |
|
429 | reason the file could not be opened. After automatic crash | |
424 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and |
|
430 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and | |
425 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. |
|
431 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. | |
426 | (_should_recompile): Don't fire editor if using %bg, since there |
|
432 | (_should_recompile): Don't fire editor if using %bg, since there | |
427 | is no file in the first place. From the same report as above. |
|
433 | is no file in the first place. From the same report as above. | |
428 | (raw_input): protect against faulty third-party prefilters. After |
|
434 | (raw_input): protect against faulty third-party prefilters. After | |
429 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> |
|
435 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> | |
430 | while running under SAGE. |
|
436 | while running under SAGE. | |
431 |
|
437 | |||
432 | 2006-05-23 Ville Vainio <vivainio@gmail.com> |
|
438 | 2006-05-23 Ville Vainio <vivainio@gmail.com> | |
433 |
|
439 | |||
434 | * ipapi.py: Stripped down ip.to_user_ns() to work only as |
|
440 | * ipapi.py: Stripped down ip.to_user_ns() to work only as | |
435 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() |
|
441 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() | |
436 | now returns None (again), unless dummy is specifically allowed by |
|
442 | now returns None (again), unless dummy is specifically allowed by | |
437 | ipapi.get(allow_dummy=True). |
|
443 | ipapi.get(allow_dummy=True). | |
438 |
|
444 | |||
439 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
445 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
440 |
|
446 | |||
441 | * IPython: remove all 2.2-compatibility objects and hacks from |
|
447 | * IPython: remove all 2.2-compatibility objects and hacks from | |
442 | everywhere, since we only support 2.3 at this point. Docs |
|
448 | everywhere, since we only support 2.3 at this point. Docs | |
443 | updated. |
|
449 | updated. | |
444 |
|
450 | |||
445 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. |
|
451 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. | |
446 | Anything requiring extra validation can be turned into a Python |
|
452 | Anything requiring extra validation can be turned into a Python | |
447 | property in the future. I used a property for the db one b/c |
|
453 | property in the future. I used a property for the db one b/c | |
448 | there was a nasty circularity problem with the initialization |
|
454 | there was a nasty circularity problem with the initialization | |
449 | order, which right now I don't have time to clean up. |
|
455 | order, which right now I don't have time to clean up. | |
450 |
|
456 | |||
451 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, |
|
457 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, | |
452 | another locking bug reported by Jorgen. I'm not 100% sure though, |
|
458 | another locking bug reported by Jorgen. I'm not 100% sure though, | |
453 | so more testing is needed... |
|
459 | so more testing is needed... | |
454 |
|
460 | |||
455 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
461 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
456 |
|
462 | |||
457 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject |
|
463 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject | |
458 | local variables from any routine in user code (typically executed |
|
464 | local variables from any routine in user code (typically executed | |
459 | with %run) directly into the interactive namespace. Very useful |
|
465 | with %run) directly into the interactive namespace. Very useful | |
460 | when doing complex debugging. |
|
466 | when doing complex debugging. | |
461 | (IPythonNotRunning): Changed the default None object to a dummy |
|
467 | (IPythonNotRunning): Changed the default None object to a dummy | |
462 | whose attributes can be queried as well as called without |
|
468 | whose attributes can be queried as well as called without | |
463 | exploding, to ease writing code which works transparently both in |
|
469 | exploding, to ease writing code which works transparently both in | |
464 | and out of ipython and uses some of this API. |
|
470 | and out of ipython and uses some of this API. | |
465 |
|
471 | |||
466 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> |
|
472 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> | |
467 |
|
473 | |||
468 | * IPython/hooks.py (result_display): Fix the fact that our display |
|
474 | * IPython/hooks.py (result_display): Fix the fact that our display | |
469 | hook was using str() instead of repr(), as the default python |
|
475 | hook was using str() instead of repr(), as the default python | |
470 | console does. This had gone unnoticed b/c it only happened if |
|
476 | console does. This had gone unnoticed b/c it only happened if | |
471 | %Pprint was off, but the inconsistency was there. |
|
477 | %Pprint was off, but the inconsistency was there. | |
472 |
|
478 | |||
473 | 2006-05-15 Ville Vainio <vivainio@gmail.com> |
|
479 | 2006-05-15 Ville Vainio <vivainio@gmail.com> | |
474 |
|
480 | |||
475 | * Oinspect.py: Only show docstring for nonexisting/binary files |
|
481 | * Oinspect.py: Only show docstring for nonexisting/binary files | |
476 | when doing object??, closing ticket #62 |
|
482 | when doing object??, closing ticket #62 | |
477 |
|
483 | |||
478 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
484 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
479 |
|
485 | |||
480 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading |
|
486 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading | |
481 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock |
|
487 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock | |
482 | was being released in a routine which hadn't checked if it had |
|
488 | was being released in a routine which hadn't checked if it had | |
483 | been the one to acquire it. |
|
489 | been the one to acquire it. | |
484 |
|
490 | |||
485 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
491 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
486 |
|
492 | |||
487 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. |
|
493 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. | |
488 |
|
494 | |||
489 | 2006-04-11 Ville Vainio <vivainio@gmail.com> |
|
495 | 2006-04-11 Ville Vainio <vivainio@gmail.com> | |
490 |
|
496 | |||
491 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" |
|
497 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" | |
492 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython |
|
498 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython | |
493 | prefilters, allowing stuff like magics and aliases in the file. |
|
499 | prefilters, allowing stuff like magics and aliases in the file. | |
494 |
|
500 | |||
495 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic |
|
501 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic | |
496 | added. Supported now are "%clear in" and "%clear out" (clear input and |
|
502 | added. Supported now are "%clear in" and "%clear out" (clear input and | |
497 | output history, respectively). Also fixed CachedOutput.flush to |
|
503 | output history, respectively). Also fixed CachedOutput.flush to | |
498 | properly flush the output cache. |
|
504 | properly flush the output cache. | |
499 |
|
505 | |||
500 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" |
|
506 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" | |
501 | half-success (and fail explicitly). |
|
507 | half-success (and fail explicitly). | |
502 |
|
508 | |||
503 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
509 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
504 |
|
510 | |||
505 | * iplib.py: Fix quoting of aliases so that only argless ones |
|
511 | * iplib.py: Fix quoting of aliases so that only argless ones | |
506 | are quoted |
|
512 | are quoted | |
507 |
|
513 | |||
508 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
514 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
509 |
|
515 | |||
510 | * iplib.py: Quote aliases with spaces in the name. |
|
516 | * iplib.py: Quote aliases with spaces in the name. | |
511 | "c:\program files\blah\bin" is now legal alias target. |
|
517 | "c:\program files\blah\bin" is now legal alias target. | |
512 |
|
518 | |||
513 | * ext_rehashdir.py: Space no longer allowed as arg |
|
519 | * ext_rehashdir.py: Space no longer allowed as arg | |
514 | separator, since space is legal in path names. |
|
520 | separator, since space is legal in path names. | |
515 |
|
521 | |||
516 | 2006-03-16 Ville Vainio <vivainio@gmail.com> |
|
522 | 2006-03-16 Ville Vainio <vivainio@gmail.com> | |
517 |
|
523 | |||
518 | * upgrade_dir.py: Take path.py from Extensions, correcting |
|
524 | * upgrade_dir.py: Take path.py from Extensions, correcting | |
519 | %upgrade magic |
|
525 | %upgrade magic | |
520 |
|
526 | |||
521 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. |
|
527 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. | |
522 |
|
528 | |||
523 | * hooks.py: Only enclose editor binary in quotes if legal and |
|
529 | * hooks.py: Only enclose editor binary in quotes if legal and | |
524 | necessary (space in the name, and is an existing file). Fixes a bug |
|
530 | necessary (space in the name, and is an existing file). Fixes a bug | |
525 | reported by Zachary Pincus. |
|
531 | reported by Zachary Pincus. | |
526 |
|
532 | |||
527 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
533 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
528 |
|
534 | |||
529 | * Manual: thanks to a tip on proper color handling for Emacs, by |
|
535 | * Manual: thanks to a tip on proper color handling for Emacs, by | |
530 | Eric J Haywiser <ejh1-AT-MIT.EDU>. |
|
536 | Eric J Haywiser <ejh1-AT-MIT.EDU>. | |
531 |
|
537 | |||
532 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 |
|
538 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 | |
533 | by applying the provided patch. Thanks to Liu Jin |
|
539 | by applying the provided patch. Thanks to Liu Jin | |
534 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under |
|
540 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under | |
535 | XEmacs/Linux, I'm trusting the submitter that it actually helps |
|
541 | XEmacs/Linux, I'm trusting the submitter that it actually helps | |
536 | under win32/GNU Emacs. Will revisit if any problems are reported. |
|
542 | under win32/GNU Emacs. Will revisit if any problems are reported. | |
537 |
|
543 | |||
538 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
544 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
539 |
|
545 | |||
540 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py |
|
546 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py | |
541 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. |
|
547 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. | |
542 |
|
548 | |||
543 | 2006-03-12 Ville Vainio <vivainio@gmail.com> |
|
549 | 2006-03-12 Ville Vainio <vivainio@gmail.com> | |
544 |
|
550 | |||
545 | * Magic.py (magic_timeit): Added %timeit magic, contributed by |
|
551 | * Magic.py (magic_timeit): Added %timeit magic, contributed by | |
546 | Torsten Marek. |
|
552 | Torsten Marek. | |
547 |
|
553 | |||
548 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
554 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
549 |
|
555 | |||
550 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for |
|
556 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for | |
551 | line ranges works again. |
|
557 | line ranges works again. | |
552 |
|
558 | |||
553 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
559 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
554 |
|
560 | |||
555 | * IPython/iplib.py (showtraceback): add back sys.last_traceback |
|
561 | * IPython/iplib.py (showtraceback): add back sys.last_traceback | |
556 | and friends, after a discussion with Zach Pincus on ipython-user. |
|
562 | and friends, after a discussion with Zach Pincus on ipython-user. | |
557 | I'm not 100% sure, but after thinking about it quite a bit, it may |
|
563 | I'm not 100% sure, but after thinking about it quite a bit, it may | |
558 | be OK. Testing with the multithreaded shells didn't reveal any |
|
564 | be OK. Testing with the multithreaded shells didn't reveal any | |
559 | problems, but let's keep an eye out. |
|
565 | problems, but let's keep an eye out. | |
560 |
|
566 | |||
561 | In the process, I fixed a few things which were calling |
|
567 | In the process, I fixed a few things which were calling | |
562 | self.InteractiveTB() directly (like safe_execfile), which is a |
|
568 | self.InteractiveTB() directly (like safe_execfile), which is a | |
563 | mistake: ALL exception reporting should be done by calling |
|
569 | mistake: ALL exception reporting should be done by calling | |
564 | self.showtraceback(), which handles state and tab-completion and |
|
570 | self.showtraceback(), which handles state and tab-completion and | |
565 | more. |
|
571 | more. | |
566 |
|
572 | |||
567 | 2006-03-01 Ville Vainio <vivainio@gmail.com> |
|
573 | 2006-03-01 Ville Vainio <vivainio@gmail.com> | |
568 |
|
574 | |||
569 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. |
|
575 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. | |
570 | To use, do "from ipipe import *". |
|
576 | To use, do "from ipipe import *". | |
571 |
|
577 | |||
572 | 2006-02-24 Ville Vainio <vivainio@gmail.com> |
|
578 | 2006-02-24 Ville Vainio <vivainio@gmail.com> | |
573 |
|
579 | |||
574 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more |
|
580 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more | |
575 | "cleanly" and safely than the older upgrade mechanism. |
|
581 | "cleanly" and safely than the older upgrade mechanism. | |
576 |
|
582 | |||
577 | 2006-02-21 Ville Vainio <vivainio@gmail.com> |
|
583 | 2006-02-21 Ville Vainio <vivainio@gmail.com> | |
578 |
|
584 | |||
579 | * Magic.py: %save works again. |
|
585 | * Magic.py: %save works again. | |
580 |
|
586 | |||
581 | 2006-02-15 Ville Vainio <vivainio@gmail.com> |
|
587 | 2006-02-15 Ville Vainio <vivainio@gmail.com> | |
582 |
|
588 | |||
583 | * Magic.py: %Pprint works again |
|
589 | * Magic.py: %Pprint works again | |
584 |
|
590 | |||
585 | * Extensions/ipy_sane_defaults.py: Provide everything provided |
|
591 | * Extensions/ipy_sane_defaults.py: Provide everything provided | |
586 | in default ipythonrc, to make it possible to have a completely empty |
|
592 | in default ipythonrc, to make it possible to have a completely empty | |
587 | ipythonrc (and thus completely rc-file free configuration) |
|
593 | ipythonrc (and thus completely rc-file free configuration) | |
588 |
|
594 | |||
589 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
595 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
590 |
|
596 | |||
591 | * IPython/hooks.py (editor): quote the call to the editor command, |
|
597 | * IPython/hooks.py (editor): quote the call to the editor command, | |
592 | to allow commands with spaces in them. Problem noted by watching |
|
598 | to allow commands with spaces in them. Problem noted by watching | |
593 | Ian Oswald's video about textpad under win32 at |
|
599 | Ian Oswald's video about textpad under win32 at | |
594 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries |
|
600 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries | |
595 |
|
601 | |||
596 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when |
|
602 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when | |
597 | describing magics (we haven't used @ for a loong time). |
|
603 | describing magics (we haven't used @ for a loong time). | |
598 |
|
604 | |||
599 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch |
|
605 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch | |
600 | contributed by marienz to close |
|
606 | contributed by marienz to close | |
601 | http://www.scipy.net/roundup/ipython/issue53. |
|
607 | http://www.scipy.net/roundup/ipython/issue53. | |
602 |
|
608 | |||
603 | 2006-02-10 Ville Vainio <vivainio@gmail.com> |
|
609 | 2006-02-10 Ville Vainio <vivainio@gmail.com> | |
604 |
|
610 | |||
605 | * genutils.py: getoutput now works in win32 too |
|
611 | * genutils.py: getoutput now works in win32 too | |
606 |
|
612 | |||
607 | * completer.py: alias and magic completion only invoked |
|
613 | * completer.py: alias and magic completion only invoked | |
608 | at the first "item" in the line, to avoid "cd %store" |
|
614 | at the first "item" in the line, to avoid "cd %store" | |
609 | nonsense. |
|
615 | nonsense. | |
610 |
|
616 | |||
611 | 2006-02-09 Ville Vainio <vivainio@gmail.com> |
|
617 | 2006-02-09 Ville Vainio <vivainio@gmail.com> | |
612 |
|
618 | |||
613 | * test/*: Added a unit testing framework (finally). |
|
619 | * test/*: Added a unit testing framework (finally). | |
614 | '%run runtests.py' to run test_*. |
|
620 | '%run runtests.py' to run test_*. | |
615 |
|
621 | |||
616 | * ipapi.py: Exposed runlines and set_custom_exc |
|
622 | * ipapi.py: Exposed runlines and set_custom_exc | |
617 |
|
623 | |||
618 | 2006-02-07 Ville Vainio <vivainio@gmail.com> |
|
624 | 2006-02-07 Ville Vainio <vivainio@gmail.com> | |
619 |
|
625 | |||
620 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, |
|
626 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, | |
621 | instead use "f(1 2)" as before. |
|
627 | instead use "f(1 2)" as before. | |
622 |
|
628 | |||
623 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
629 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
624 |
|
630 | |||
625 | * IPython/demo.py (IPythonDemo): Add new classes to the demo |
|
631 | * IPython/demo.py (IPythonDemo): Add new classes to the demo | |
626 | facilities, for demos processed by the IPython input filter |
|
632 | facilities, for demos processed by the IPython input filter | |
627 | (IPythonDemo), and for running a script one-line-at-a-time as a |
|
633 | (IPythonDemo), and for running a script one-line-at-a-time as a | |
628 | demo, both for pure Python (LineDemo) and for IPython-processed |
|
634 | demo, both for pure Python (LineDemo) and for IPython-processed | |
629 | input (IPythonLineDemo). After a request by Dave Kohel, from the |
|
635 | input (IPythonLineDemo). After a request by Dave Kohel, from the | |
630 | SAGE team. |
|
636 | SAGE team. | |
631 | (Demo.edit): added an edit() method to the demo objects, to edit |
|
637 | (Demo.edit): added an edit() method to the demo objects, to edit | |
632 | the in-memory copy of the last executed block. |
|
638 | the in-memory copy of the last executed block. | |
633 |
|
639 | |||
634 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' |
|
640 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' | |
635 | processing to %edit, %macro and %save. These commands can now be |
|
641 | processing to %edit, %macro and %save. These commands can now be | |
636 | invoked on the unprocessed input as it was typed by the user |
|
642 | invoked on the unprocessed input as it was typed by the user | |
637 | (without any prefilters applied). After requests by the SAGE team |
|
643 | (without any prefilters applied). After requests by the SAGE team | |
638 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. |
|
644 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. | |
639 |
|
645 | |||
640 | 2006-02-01 Ville Vainio <vivainio@gmail.com> |
|
646 | 2006-02-01 Ville Vainio <vivainio@gmail.com> | |
641 |
|
647 | |||
642 | * setup.py, eggsetup.py: easy_install ipython==dev works |
|
648 | * setup.py, eggsetup.py: easy_install ipython==dev works | |
643 | correctly now (on Linux) |
|
649 | correctly now (on Linux) | |
644 |
|
650 | |||
645 | * ipy_user_conf,ipmaker: user config changes, removed spurious |
|
651 | * ipy_user_conf,ipmaker: user config changes, removed spurious | |
646 | warnings |
|
652 | warnings | |
647 |
|
653 | |||
648 | * iplib: if rc.banner is string, use it as is. |
|
654 | * iplib: if rc.banner is string, use it as is. | |
649 |
|
655 | |||
650 | * Magic: %pycat accepts a string argument and pages it's contents. |
|
656 | * Magic: %pycat accepts a string argument and pages it's contents. | |
651 |
|
657 | |||
652 |
|
658 | |||
653 | 2006-01-30 Ville Vainio <vivainio@gmail.com> |
|
659 | 2006-01-30 Ville Vainio <vivainio@gmail.com> | |
654 |
|
660 | |||
655 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. |
|
661 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. | |
656 | Now %store and bookmarks work through PickleShare, meaning that |
|
662 | Now %store and bookmarks work through PickleShare, meaning that | |
657 | concurrent access is possible and all ipython sessions see the |
|
663 | concurrent access is possible and all ipython sessions see the | |
658 | same database situation all the time, instead of snapshot of |
|
664 | same database situation all the time, instead of snapshot of | |
659 | the situation when the session was started. Hence, %bookmark |
|
665 | the situation when the session was started. Hence, %bookmark | |
660 | results are immediately accessible from othes sessions. The database |
|
666 | results are immediately accessible from othes sessions. The database | |
661 | is also available for use by user extensions. See: |
|
667 | is also available for use by user extensions. See: | |
662 | http://www.python.org/pypi/pickleshare |
|
668 | http://www.python.org/pypi/pickleshare | |
663 |
|
669 | |||
664 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. |
|
670 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. | |
665 |
|
671 | |||
666 | * aliases can now be %store'd |
|
672 | * aliases can now be %store'd | |
667 |
|
673 | |||
668 | * path.py moved to Extensions so that pickleshare does not need |
|
674 | * path.py moved to Extensions so that pickleshare does not need | |
669 | IPython-specific import. Extensions added to pythonpath right |
|
675 | IPython-specific import. Extensions added to pythonpath right | |
670 | at __init__. |
|
676 | at __init__. | |
671 |
|
677 | |||
672 | * iplib.py: ipalias deprecated/redundant; aliases are converted and |
|
678 | * iplib.py: ipalias deprecated/redundant; aliases are converted and | |
673 | called with _ip.system and the pre-transformed command string. |
|
679 | called with _ip.system and the pre-transformed command string. | |
674 |
|
680 | |||
675 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
681 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
676 |
|
682 | |||
677 | * IPython/iplib.py (interact): Fix that we were not catching |
|
683 | * IPython/iplib.py (interact): Fix that we were not catching | |
678 | KeyboardInterrupt exceptions properly. I'm not quite sure why the |
|
684 | KeyboardInterrupt exceptions properly. I'm not quite sure why the | |
679 | logic here had to change, but it's fixed now. |
|
685 | logic here had to change, but it's fixed now. | |
680 |
|
686 | |||
681 | 2006-01-29 Ville Vainio <vivainio@gmail.com> |
|
687 | 2006-01-29 Ville Vainio <vivainio@gmail.com> | |
682 |
|
688 | |||
683 | * iplib.py: Try to import pyreadline on Windows. |
|
689 | * iplib.py: Try to import pyreadline on Windows. | |
684 |
|
690 | |||
685 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
691 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
686 |
|
692 | |||
687 | * iplib.py: Expose ipapi as _ip in builtin namespace. |
|
693 | * iplib.py: Expose ipapi as _ip in builtin namespace. | |
688 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) |
|
694 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) | |
689 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! |
|
695 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! | |
690 | syntax now produce _ip.* variant of the commands. |
|
696 | syntax now produce _ip.* variant of the commands. | |
691 |
|
697 | |||
692 | * "_ip.options().autoedit_syntax = 2" automatically throws |
|
698 | * "_ip.options().autoedit_syntax = 2" automatically throws | |
693 | user to editor for syntax error correction without prompting. |
|
699 | user to editor for syntax error correction without prompting. | |
694 |
|
700 | |||
695 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
701 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
696 |
|
702 | |||
697 | * ipmaker.py: Give "realistic" sys.argv for scripts (without |
|
703 | * ipmaker.py: Give "realistic" sys.argv for scripts (without | |
698 | 'ipython' at argv[0]) executed through command line. |
|
704 | 'ipython' at argv[0]) executed through command line. | |
699 | NOTE: this DEPRECATES calling ipython with multiple scripts |
|
705 | NOTE: this DEPRECATES calling ipython with multiple scripts | |
700 | ("ipython a.py b.py c.py") |
|
706 | ("ipython a.py b.py c.py") | |
701 |
|
707 | |||
702 | * iplib.py, hooks.py: Added configurable input prefilter, |
|
708 | * iplib.py, hooks.py: Added configurable input prefilter, | |
703 | named 'input_prefilter'. See ext_rescapture.py for example |
|
709 | named 'input_prefilter'. See ext_rescapture.py for example | |
704 | usage. |
|
710 | usage. | |
705 |
|
711 | |||
706 | * ext_rescapture.py, Magic.py: Better system command output capture |
|
712 | * ext_rescapture.py, Magic.py: Better system command output capture | |
707 | through 'var = !ls' (deprecates user-visible %sc). Same notation |
|
713 | through 'var = !ls' (deprecates user-visible %sc). Same notation | |
708 | applies for magics, 'var = %alias' assigns alias list to var. |
|
714 | applies for magics, 'var = %alias' assigns alias list to var. | |
709 |
|
715 | |||
710 | * ipapi.py: added meta() for accessing extension-usable data store. |
|
716 | * ipapi.py: added meta() for accessing extension-usable data store. | |
711 |
|
717 | |||
712 | * iplib.py: added InteractiveShell.getapi(). New magics should be |
|
718 | * iplib.py: added InteractiveShell.getapi(). New magics should be | |
713 | written doing self.getapi() instead of using the shell directly. |
|
719 | written doing self.getapi() instead of using the shell directly. | |
714 |
|
720 | |||
715 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and |
|
721 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and | |
716 | %store foo >> ~/myfoo.txt to store variables to files (in clean |
|
722 | %store foo >> ~/myfoo.txt to store variables to files (in clean | |
717 | textual form, not a restorable pickle). |
|
723 | textual form, not a restorable pickle). | |
718 |
|
724 | |||
719 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically |
|
725 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically | |
720 |
|
726 | |||
721 | * usage.py, Magic.py: added %quickref |
|
727 | * usage.py, Magic.py: added %quickref | |
722 |
|
728 | |||
723 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). |
|
729 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). | |
724 |
|
730 | |||
725 | * GetoptErrors when invoking magics etc. with wrong args |
|
731 | * GetoptErrors when invoking magics etc. with wrong args | |
726 | are now more helpful: |
|
732 | are now more helpful: | |
727 | GetoptError: option -l not recognized (allowed: "qb" ) |
|
733 | GetoptError: option -l not recognized (allowed: "qb" ) | |
728 |
|
734 | |||
729 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
735 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
730 |
|
736 | |||
731 | * IPython/demo.py (Demo.show): Flush stdout after each block, so |
|
737 | * IPython/demo.py (Demo.show): Flush stdout after each block, so | |
732 | computationally intensive blocks don't appear to stall the demo. |
|
738 | computationally intensive blocks don't appear to stall the demo. | |
733 |
|
739 | |||
734 | 2006-01-24 Ville Vainio <vivainio@gmail.com> |
|
740 | 2006-01-24 Ville Vainio <vivainio@gmail.com> | |
735 |
|
741 | |||
736 | * iplib.py, hooks.py: 'result_display' hook can return a non-None |
|
742 | * iplib.py, hooks.py: 'result_display' hook can return a non-None | |
737 | value to manipulate resulting history entry. |
|
743 | value to manipulate resulting history entry. | |
738 |
|
744 | |||
739 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions |
|
745 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions | |
740 | to instance methods of IPApi class, to make extending an embedded |
|
746 | to instance methods of IPApi class, to make extending an embedded | |
741 | IPython feasible. See ext_rehashdir.py for example usage. |
|
747 | IPython feasible. See ext_rehashdir.py for example usage. | |
742 |
|
748 | |||
743 | * Merged 1071-1076 from branches/0.7.1 |
|
749 | * Merged 1071-1076 from branches/0.7.1 | |
744 |
|
750 | |||
745 |
|
751 | |||
746 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
752 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
747 |
|
753 | |||
748 | * tools/release (daystamp): Fix build tools to use the new |
|
754 | * tools/release (daystamp): Fix build tools to use the new | |
749 | eggsetup.py script to build lightweight eggs. |
|
755 | eggsetup.py script to build lightweight eggs. | |
750 |
|
756 | |||
751 | * Applied changesets 1062 and 1064 before 0.7.1 release. |
|
757 | * Applied changesets 1062 and 1064 before 0.7.1 release. | |
752 |
|
758 | |||
753 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to |
|
759 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to | |
754 | see the raw input history (without conversions like %ls -> |
|
760 | see the raw input history (without conversions like %ls -> | |
755 | ipmagic("ls")). After a request from W. Stein, SAGE |
|
761 | ipmagic("ls")). After a request from W. Stein, SAGE | |
756 | (http://modular.ucsd.edu/sage) developer. This information is |
|
762 | (http://modular.ucsd.edu/sage) developer. This information is | |
757 | stored in the input_hist_raw attribute of the IPython instance, so |
|
763 | stored in the input_hist_raw attribute of the IPython instance, so | |
758 | developers can access it if needed (it's an InputList instance). |
|
764 | developers can access it if needed (it's an InputList instance). | |
759 |
|
765 | |||
760 | * Versionstring = 0.7.2.svn |
|
766 | * Versionstring = 0.7.2.svn | |
761 |
|
767 | |||
762 | * eggsetup.py: A separate script for constructing eggs, creates |
|
768 | * eggsetup.py: A separate script for constructing eggs, creates | |
763 | proper launch scripts even on Windows (an .exe file in |
|
769 | proper launch scripts even on Windows (an .exe file in | |
764 | \python24\scripts). |
|
770 | \python24\scripts). | |
765 |
|
771 | |||
766 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
772 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
767 | egg. |
|
773 | egg. | |
768 |
|
774 | |||
769 | 2006-01-23 Ville Vainio <vivainio@gmail.com> |
|
775 | 2006-01-23 Ville Vainio <vivainio@gmail.com> | |
770 |
|
776 | |||
771 | * Added %cpaste magic for pasting python code |
|
777 | * Added %cpaste magic for pasting python code | |
772 |
|
778 | |||
773 | 2006-01-22 Ville Vainio <vivainio@gmail.com> |
|
779 | 2006-01-22 Ville Vainio <vivainio@gmail.com> | |
774 |
|
780 | |||
775 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 |
|
781 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 | |
776 |
|
782 | |||
777 | * Versionstring = 0.7.2.svn |
|
783 | * Versionstring = 0.7.2.svn | |
778 |
|
784 | |||
779 | * eggsetup.py: A separate script for constructing eggs, creates |
|
785 | * eggsetup.py: A separate script for constructing eggs, creates | |
780 | proper launch scripts even on Windows (an .exe file in |
|
786 | proper launch scripts even on Windows (an .exe file in | |
781 | \python24\scripts). |
|
787 | \python24\scripts). | |
782 |
|
788 | |||
783 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
789 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
784 | egg. |
|
790 | egg. | |
785 |
|
791 | |||
786 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
792 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
787 |
|
793 | |||
788 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or |
|
794 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or | |
789 | %pfile foo would print the file for foo even if it was a binary. |
|
795 | %pfile foo would print the file for foo even if it was a binary. | |
790 | Now, extensions '.so' and '.dll' are skipped. |
|
796 | Now, extensions '.so' and '.dll' are skipped. | |
791 |
|
797 | |||
792 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading |
|
798 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading | |
793 | bug, where macros would fail in all threaded modes. I'm not 100% |
|
799 | bug, where macros would fail in all threaded modes. I'm not 100% | |
794 | sure, so I'm going to put out an rc instead of making a release |
|
800 | sure, so I'm going to put out an rc instead of making a release | |
795 | today, and wait for feedback for at least a few days. |
|
801 | today, and wait for feedback for at least a few days. | |
796 |
|
802 | |||
797 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt |
|
803 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt | |
798 | it...) the handling of pasting external code with autoindent on. |
|
804 | it...) the handling of pasting external code with autoindent on. | |
799 | To get out of a multiline input, the rule will appear for most |
|
805 | To get out of a multiline input, the rule will appear for most | |
800 | users unchanged: two blank lines or change the indent level |
|
806 | users unchanged: two blank lines or change the indent level | |
801 | proposed by IPython. But there is a twist now: you can |
|
807 | proposed by IPython. But there is a twist now: you can | |
802 | add/subtract only *one or two spaces*. If you add/subtract three |
|
808 | add/subtract only *one or two spaces*. If you add/subtract three | |
803 | or more (unless you completely delete the line), IPython will |
|
809 | or more (unless you completely delete the line), IPython will | |
804 | accept that line, and you'll need to enter a second one of pure |
|
810 | accept that line, and you'll need to enter a second one of pure | |
805 | whitespace. I know it sounds complicated, but I can't find a |
|
811 | whitespace. I know it sounds complicated, but I can't find a | |
806 | different solution that covers all the cases, with the right |
|
812 | different solution that covers all the cases, with the right | |
807 | heuristics. Hopefully in actual use, nobody will really notice |
|
813 | heuristics. Hopefully in actual use, nobody will really notice | |
808 | all these strange rules and things will 'just work'. |
|
814 | all these strange rules and things will 'just work'. | |
809 |
|
815 | |||
810 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> |
|
816 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> | |
811 |
|
817 | |||
812 | * IPython/iplib.py (interact): catch exceptions which can be |
|
818 | * IPython/iplib.py (interact): catch exceptions which can be | |
813 | triggered asynchronously by signal handlers. Thanks to an |
|
819 | triggered asynchronously by signal handlers. Thanks to an | |
814 | automatic crash report, submitted by Colin Kingsley |
|
820 | automatic crash report, submitted by Colin Kingsley | |
815 | <tercel-AT-gentoo.org>. |
|
821 | <tercel-AT-gentoo.org>. | |
816 |
|
822 | |||
817 | 2006-01-20 Ville Vainio <vivainio@gmail.com> |
|
823 | 2006-01-20 Ville Vainio <vivainio@gmail.com> | |
818 |
|
824 | |||
819 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example |
|
825 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example | |
820 | (%rehashdir, very useful, try it out) of how to extend ipython |
|
826 | (%rehashdir, very useful, try it out) of how to extend ipython | |
821 | with new magics. Also added Extensions dir to pythonpath to make |
|
827 | with new magics. Also added Extensions dir to pythonpath to make | |
822 | importing extensions easy. |
|
828 | importing extensions easy. | |
823 |
|
829 | |||
824 | * %store now complains when trying to store interactively declared |
|
830 | * %store now complains when trying to store interactively declared | |
825 | classes / instances of those classes. |
|
831 | classes / instances of those classes. | |
826 |
|
832 | |||
827 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, |
|
833 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, | |
828 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported |
|
834 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported | |
829 | if they exist, and ipy_user_conf.py with some defaults is created for |
|
835 | if they exist, and ipy_user_conf.py with some defaults is created for | |
830 | the user. |
|
836 | the user. | |
831 |
|
837 | |||
832 | * Startup rehashing done by the config file, not InterpreterExec. |
|
838 | * Startup rehashing done by the config file, not InterpreterExec. | |
833 | This means system commands are available even without selecting the |
|
839 | This means system commands are available even without selecting the | |
834 | pysh profile. It's the sensible default after all. |
|
840 | pysh profile. It's the sensible default after all. | |
835 |
|
841 | |||
836 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
842 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
837 |
|
843 | |||
838 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of |
|
844 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of | |
839 | multiline code with autoindent on working. But I am really not |
|
845 | multiline code with autoindent on working. But I am really not | |
840 | sure, so this needs more testing. Will commit a debug-enabled |
|
846 | sure, so this needs more testing. Will commit a debug-enabled | |
841 | version for now, while I test it some more, so that Ville and |
|
847 | version for now, while I test it some more, so that Ville and | |
842 | others may also catch any problems. Also made |
|
848 | others may also catch any problems. Also made | |
843 | self.indent_current_str() a method, to ensure that there's no |
|
849 | self.indent_current_str() a method, to ensure that there's no | |
844 | chance of the indent space count and the corresponding string |
|
850 | chance of the indent space count and the corresponding string | |
845 | falling out of sync. All code needing the string should just call |
|
851 | falling out of sync. All code needing the string should just call | |
846 | the method. |
|
852 | the method. | |
847 |
|
853 | |||
848 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
854 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
849 |
|
855 | |||
850 | * IPython/Magic.py (magic_edit): fix check for when users don't |
|
856 | * IPython/Magic.py (magic_edit): fix check for when users don't | |
851 | save their output files, the try/except was in the wrong section. |
|
857 | save their output files, the try/except was in the wrong section. | |
852 |
|
858 | |||
853 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
859 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
854 |
|
860 | |||
855 | * IPython/Magic.py (magic_run): fix __file__ global missing from |
|
861 | * IPython/Magic.py (magic_run): fix __file__ global missing from | |
856 | script's namespace when executed via %run. After a report by |
|
862 | script's namespace when executed via %run. After a report by | |
857 | Vivian. |
|
863 | Vivian. | |
858 |
|
864 | |||
859 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' |
|
865 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' | |
860 | when using python 2.4. The parent constructor changed in 2.4, and |
|
866 | when using python 2.4. The parent constructor changed in 2.4, and | |
861 | we need to track it directly (we can't call it, as it messes up |
|
867 | we need to track it directly (we can't call it, as it messes up | |
862 | readline and tab-completion inside our pdb would stop working). |
|
868 | readline and tab-completion inside our pdb would stop working). | |
863 | After a bug report by R. Bernstein <rocky-AT-panix.com>. |
|
869 | After a bug report by R. Bernstein <rocky-AT-panix.com>. | |
864 |
|
870 | |||
865 | 2006-01-16 Ville Vainio <vivainio@gmail.com> |
|
871 | 2006-01-16 Ville Vainio <vivainio@gmail.com> | |
866 |
|
872 | |||
867 | * Ipython/magic.py: Reverted back to old %edit functionality |
|
873 | * Ipython/magic.py: Reverted back to old %edit functionality | |
868 | that returns file contents on exit. |
|
874 | that returns file contents on exit. | |
869 |
|
875 | |||
870 | * IPython/path.py: Added Jason Orendorff's "path" module to |
|
876 | * IPython/path.py: Added Jason Orendorff's "path" module to | |
871 | IPython tree, http://www.jorendorff.com/articles/python/path/. |
|
877 | IPython tree, http://www.jorendorff.com/articles/python/path/. | |
872 | You can get path objects conveniently through %sc, and !!, e.g.: |
|
878 | You can get path objects conveniently through %sc, and !!, e.g.: | |
873 | sc files=ls |
|
879 | sc files=ls | |
874 | for p in files.paths: # or files.p |
|
880 | for p in files.paths: # or files.p | |
875 | print p,p.mtime |
|
881 | print p,p.mtime | |
876 |
|
882 | |||
877 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall |
|
883 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall | |
878 | now work again without considering the exclusion regexp - |
|
884 | now work again without considering the exclusion regexp - | |
879 | hence, things like ',foo my/path' turn to 'foo("my/path")' |
|
885 | hence, things like ',foo my/path' turn to 'foo("my/path")' | |
880 | instead of syntax error. |
|
886 | instead of syntax error. | |
881 |
|
887 | |||
882 |
|
888 | |||
883 | 2006-01-14 Ville Vainio <vivainio@gmail.com> |
|
889 | 2006-01-14 Ville Vainio <vivainio@gmail.com> | |
884 |
|
890 | |||
885 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience |
|
891 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience | |
886 | ipapi decorators for python 2.4 users, options() provides access to rc |
|
892 | ipapi decorators for python 2.4 users, options() provides access to rc | |
887 | data. |
|
893 | data. | |
888 |
|
894 | |||
889 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes |
|
895 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes | |
890 | as path separators (even on Linux ;-). Space character after |
|
896 | as path separators (even on Linux ;-). Space character after | |
891 | backslash (as yielded by tab completer) is still space; |
|
897 | backslash (as yielded by tab completer) is still space; | |
892 | "%cd long\ name" works as expected. |
|
898 | "%cd long\ name" works as expected. | |
893 |
|
899 | |||
894 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented |
|
900 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented | |
895 | as "chain of command", with priority. API stays the same, |
|
901 | as "chain of command", with priority. API stays the same, | |
896 | TryNext exception raised by a hook function signals that |
|
902 | TryNext exception raised by a hook function signals that | |
897 | current hook failed and next hook should try handling it, as |
|
903 | current hook failed and next hook should try handling it, as | |
898 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also |
|
904 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also | |
899 | requested configurable display hook, which is now implemented. |
|
905 | requested configurable display hook, which is now implemented. | |
900 |
|
906 | |||
901 | 2006-01-13 Ville Vainio <vivainio@gmail.com> |
|
907 | 2006-01-13 Ville Vainio <vivainio@gmail.com> | |
902 |
|
908 | |||
903 | * IPython/platutils*.py: platform specific utility functions, |
|
909 | * IPython/platutils*.py: platform specific utility functions, | |
904 | so far only set_term_title is implemented (change terminal |
|
910 | so far only set_term_title is implemented (change terminal | |
905 | label in windowing systems). %cd now changes the title to |
|
911 | label in windowing systems). %cd now changes the title to | |
906 | current dir. |
|
912 | current dir. | |
907 |
|
913 | |||
908 | * IPython/Release.py: Added myself to "authors" list, |
|
914 | * IPython/Release.py: Added myself to "authors" list, | |
909 | had to create new files. |
|
915 | had to create new files. | |
910 |
|
916 | |||
911 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in |
|
917 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in | |
912 | shell escape; not a known bug but had potential to be one in the |
|
918 | shell escape; not a known bug but had potential to be one in the | |
913 | future. |
|
919 | future. | |
914 |
|
920 | |||
915 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" |
|
921 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" | |
916 | extension API for IPython! See the module for usage example. Fix |
|
922 | extension API for IPython! See the module for usage example. Fix | |
917 | OInspect for docstring-less magic functions. |
|
923 | OInspect for docstring-less magic functions. | |
918 |
|
924 | |||
919 |
|
925 | |||
920 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
926 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
921 |
|
927 | |||
922 | * IPython/iplib.py (raw_input): temporarily deactivate all |
|
928 | * IPython/iplib.py (raw_input): temporarily deactivate all | |
923 | attempts at allowing pasting of code with autoindent on. It |
|
929 | attempts at allowing pasting of code with autoindent on. It | |
924 | introduced bugs (reported by Prabhu) and I can't seem to find a |
|
930 | introduced bugs (reported by Prabhu) and I can't seem to find a | |
925 | robust combination which works in all cases. Will have to revisit |
|
931 | robust combination which works in all cases. Will have to revisit | |
926 | later. |
|
932 | later. | |
927 |
|
933 | |||
928 | * IPython/genutils.py: remove isspace() function. We've dropped |
|
934 | * IPython/genutils.py: remove isspace() function. We've dropped | |
929 | 2.2 compatibility, so it's OK to use the string method. |
|
935 | 2.2 compatibility, so it's OK to use the string method. | |
930 |
|
936 | |||
931 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
937 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
932 |
|
938 | |||
933 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp |
|
939 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp | |
934 | matching what NOT to autocall on, to include all python binary |
|
940 | matching what NOT to autocall on, to include all python binary | |
935 | operators (including things like 'and', 'or', 'is' and 'in'). |
|
941 | operators (including things like 'and', 'or', 'is' and 'in'). | |
936 | Prompted by a bug report on 'foo & bar', but I realized we had |
|
942 | Prompted by a bug report on 'foo & bar', but I realized we had | |
937 | many more potential bug cases with other operators. The regexp is |
|
943 | many more potential bug cases with other operators. The regexp is | |
938 | self.re_exclude_auto, it's fairly commented. |
|
944 | self.re_exclude_auto, it's fairly commented. | |
939 |
|
945 | |||
940 | 2006-01-12 Ville Vainio <vivainio@gmail.com> |
|
946 | 2006-01-12 Ville Vainio <vivainio@gmail.com> | |
941 |
|
947 | |||
942 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): |
|
948 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): | |
943 | Prettified and hardened string/backslash quoting with ipsystem(), |
|
949 | Prettified and hardened string/backslash quoting with ipsystem(), | |
944 | ipalias() and ipmagic(). Now even \ characters are passed to |
|
950 | ipalias() and ipmagic(). Now even \ characters are passed to | |
945 | %magics, !shell escapes and aliases exactly as they are in the |
|
951 | %magics, !shell escapes and aliases exactly as they are in the | |
946 | ipython command line. Should improve backslash experience, |
|
952 | ipython command line. Should improve backslash experience, | |
947 | particularly in Windows (path delimiter for some commands that |
|
953 | particularly in Windows (path delimiter for some commands that | |
948 | won't understand '/'), but Unix benefits as well (regexps). %cd |
|
954 | won't understand '/'), but Unix benefits as well (regexps). %cd | |
949 | magic still doesn't support backslash path delimiters, though. Also |
|
955 | magic still doesn't support backslash path delimiters, though. Also | |
950 | deleted all pretense of supporting multiline command strings in |
|
956 | deleted all pretense of supporting multiline command strings in | |
951 | !system or %magic commands. Thanks to Jerry McRae for suggestions. |
|
957 | !system or %magic commands. Thanks to Jerry McRae for suggestions. | |
952 |
|
958 | |||
953 | * doc/build_doc_instructions.txt added. Documentation on how to |
|
959 | * doc/build_doc_instructions.txt added. Documentation on how to | |
954 | use doc/update_manual.py, added yesterday. Both files contributed |
|
960 | use doc/update_manual.py, added yesterday. Both files contributed | |
955 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates |
|
961 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates | |
956 | doc/*.sh for deprecation at a later date. |
|
962 | doc/*.sh for deprecation at a later date. | |
957 |
|
963 | |||
958 | * /ipython.py Added ipython.py to root directory for |
|
964 | * /ipython.py Added ipython.py to root directory for | |
959 | zero-installation (tar xzvf ipython.tgz; cd ipython; python |
|
965 | zero-installation (tar xzvf ipython.tgz; cd ipython; python | |
960 | ipython.py) and development convenience (no need to keep doing |
|
966 | ipython.py) and development convenience (no need to keep doing | |
961 | "setup.py install" between changes). |
|
967 | "setup.py install" between changes). | |
962 |
|
968 | |||
963 | * Made ! and !! shell escapes work (again) in multiline expressions: |
|
969 | * Made ! and !! shell escapes work (again) in multiline expressions: | |
964 | if 1: |
|
970 | if 1: | |
965 | !ls |
|
971 | !ls | |
966 | !!ls |
|
972 | !!ls | |
967 |
|
973 | |||
968 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
974 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
969 |
|
975 | |||
970 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to |
|
976 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to | |
971 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' |
|
977 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' | |
972 | module in case-insensitive installation. Was causing crashes |
|
978 | module in case-insensitive installation. Was causing crashes | |
973 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. |
|
979 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. | |
974 |
|
980 | |||
975 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart |
|
981 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart | |
976 | <marienz-AT-gentoo.org>, closes |
|
982 | <marienz-AT-gentoo.org>, closes | |
977 | http://www.scipy.net/roundup/ipython/issue51. |
|
983 | http://www.scipy.net/roundup/ipython/issue51. | |
978 |
|
984 | |||
979 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
985 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
980 |
|
986 | |||
981 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the |
|
987 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the | |
982 | problem of excessive CPU usage under *nix and keyboard lag under |
|
988 | problem of excessive CPU usage under *nix and keyboard lag under | |
983 | win32. |
|
989 | win32. | |
984 |
|
990 | |||
985 | 2006-01-10 *** Released version 0.7.0 |
|
991 | 2006-01-10 *** Released version 0.7.0 | |
986 |
|
992 | |||
987 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
993 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
988 |
|
994 | |||
989 | * IPython/Release.py (revision): tag version number to 0.7.0, |
|
995 | * IPython/Release.py (revision): tag version number to 0.7.0, | |
990 | ready for release. |
|
996 | ready for release. | |
991 |
|
997 | |||
992 | * IPython/Magic.py (magic_edit): Add print statement to %edit so |
|
998 | * IPython/Magic.py (magic_edit): Add print statement to %edit so | |
993 | it informs the user of the name of the temp. file used. This can |
|
999 | it informs the user of the name of the temp. file used. This can | |
994 | help if you decide later to reuse that same file, so you know |
|
1000 | help if you decide later to reuse that same file, so you know | |
995 | where to copy the info from. |
|
1001 | where to copy the info from. | |
996 |
|
1002 | |||
997 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1003 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
998 |
|
1004 | |||
999 | * setup_bdist_egg.py: little script to build an egg. Added |
|
1005 | * setup_bdist_egg.py: little script to build an egg. Added | |
1000 | support in the release tools as well. |
|
1006 | support in the release tools as well. | |
1001 |
|
1007 | |||
1002 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1008 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
1003 |
|
1009 | |||
1004 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython |
|
1010 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython | |
1005 | version selection (new -wxversion command line and ipythonrc |
|
1011 | version selection (new -wxversion command line and ipythonrc | |
1006 | parameter). Patch contributed by Arnd Baecker |
|
1012 | parameter). Patch contributed by Arnd Baecker | |
1007 | <arnd.baecker-AT-web.de>. |
|
1013 | <arnd.baecker-AT-web.de>. | |
1008 |
|
1014 | |||
1009 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
1015 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
1010 | embedded instances, for variables defined at the interactive |
|
1016 | embedded instances, for variables defined at the interactive | |
1011 | prompt of the embedded ipython. Reported by Arnd. |
|
1017 | prompt of the embedded ipython. Reported by Arnd. | |
1012 |
|
1018 | |||
1013 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now |
|
1019 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now | |
1014 | it can be used as a (stateful) toggle, or with a direct parameter. |
|
1020 | it can be used as a (stateful) toggle, or with a direct parameter. | |
1015 |
|
1021 | |||
1016 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which |
|
1022 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which | |
1017 | could be triggered in certain cases and cause the traceback |
|
1023 | could be triggered in certain cases and cause the traceback | |
1018 | printer not to work. |
|
1024 | printer not to work. | |
1019 |
|
1025 | |||
1020 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1026 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
1021 |
|
1027 | |||
1022 | * IPython/iplib.py (_should_recompile): Small fix, closes |
|
1028 | * IPython/iplib.py (_should_recompile): Small fix, closes | |
1023 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. |
|
1029 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. | |
1024 |
|
1030 | |||
1025 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1031 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
1026 |
|
1032 | |||
1027 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK |
|
1033 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK | |
1028 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie |
|
1034 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie | |
1029 | Moad for help with tracking it down. |
|
1035 | Moad for help with tracking it down. | |
1030 |
|
1036 | |||
1031 | * IPython/iplib.py (handle_auto): fix autocall handling for |
|
1037 | * IPython/iplib.py (handle_auto): fix autocall handling for | |
1032 | objects which support BOTH __getitem__ and __call__ (so that f [x] |
|
1038 | objects which support BOTH __getitem__ and __call__ (so that f [x] | |
1033 | is left alone, instead of becoming f([x]) automatically). |
|
1039 | is left alone, instead of becoming f([x]) automatically). | |
1034 |
|
1040 | |||
1035 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. |
|
1041 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. | |
1036 | Ville's patch. |
|
1042 | Ville's patch. | |
1037 |
|
1043 | |||
1038 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1044 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
1039 |
|
1045 | |||
1040 | * IPython/iplib.py (handle_auto): changed autocall semantics to |
|
1046 | * IPython/iplib.py (handle_auto): changed autocall semantics to | |
1041 | include 'smart' mode, where the autocall transformation is NOT |
|
1047 | include 'smart' mode, where the autocall transformation is NOT | |
1042 | applied if there are no arguments on the line. This allows you to |
|
1048 | applied if there are no arguments on the line. This allows you to | |
1043 | just type 'foo' if foo is a callable to see its internal form, |
|
1049 | just type 'foo' if foo is a callable to see its internal form, | |
1044 | instead of having it called with no arguments (typically a |
|
1050 | instead of having it called with no arguments (typically a | |
1045 | mistake). The old 'full' autocall still exists: for that, you |
|
1051 | mistake). The old 'full' autocall still exists: for that, you | |
1046 | need to set the 'autocall' parameter to 2 in your ipythonrc file. |
|
1052 | need to set the 'autocall' parameter to 2 in your ipythonrc file. | |
1047 |
|
1053 | |||
1048 | * IPython/completer.py (Completer.attr_matches): add |
|
1054 | * IPython/completer.py (Completer.attr_matches): add | |
1049 | tab-completion support for Enthoughts' traits. After a report by |
|
1055 | tab-completion support for Enthoughts' traits. After a report by | |
1050 | Arnd and a patch by Prabhu. |
|
1056 | Arnd and a patch by Prabhu. | |
1051 |
|
1057 | |||
1052 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1058 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
1053 |
|
1059 | |||
1054 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex |
|
1060 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex | |
1055 | Schmolck's patch to fix inspect.getinnerframes(). |
|
1061 | Schmolck's patch to fix inspect.getinnerframes(). | |
1056 |
|
1062 | |||
1057 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes |
|
1063 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes | |
1058 | for embedded instances, regarding handling of namespaces and items |
|
1064 | for embedded instances, regarding handling of namespaces and items | |
1059 | added to the __builtin__ one. Multiple embedded instances and |
|
1065 | added to the __builtin__ one. Multiple embedded instances and | |
1060 | recursive embeddings should work better now (though I'm not sure |
|
1066 | recursive embeddings should work better now (though I'm not sure | |
1061 | I've got all the corner cases fixed, that code is a bit of a brain |
|
1067 | I've got all the corner cases fixed, that code is a bit of a brain | |
1062 | twister). |
|
1068 | twister). | |
1063 |
|
1069 | |||
1064 | * IPython/Magic.py (magic_edit): added support to edit in-memory |
|
1070 | * IPython/Magic.py (magic_edit): added support to edit in-memory | |
1065 | macros (automatically creates the necessary temp files). %edit |
|
1071 | macros (automatically creates the necessary temp files). %edit | |
1066 | also doesn't return the file contents anymore, it's just noise. |
|
1072 | also doesn't return the file contents anymore, it's just noise. | |
1067 |
|
1073 | |||
1068 | * IPython/completer.py (Completer.attr_matches): revert change to |
|
1074 | * IPython/completer.py (Completer.attr_matches): revert change to | |
1069 | complete only on attributes listed in __all__. I realized it |
|
1075 | complete only on attributes listed in __all__. I realized it | |
1070 | cripples the tab-completion system as a tool for exploring the |
|
1076 | cripples the tab-completion system as a tool for exploring the | |
1071 | internals of unknown libraries (it renders any non-__all__ |
|
1077 | internals of unknown libraries (it renders any non-__all__ | |
1072 | attribute off-limits). I got bit by this when trying to see |
|
1078 | attribute off-limits). I got bit by this when trying to see | |
1073 | something inside the dis module. |
|
1079 | something inside the dis module. | |
1074 |
|
1080 | |||
1075 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1081 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1076 |
|
1082 | |||
1077 | * IPython/iplib.py (InteractiveShell.__init__): add .meta |
|
1083 | * IPython/iplib.py (InteractiveShell.__init__): add .meta | |
1078 | namespace for users and extension writers to hold data in. This |
|
1084 | namespace for users and extension writers to hold data in. This | |
1079 | follows the discussion in |
|
1085 | follows the discussion in | |
1080 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. |
|
1086 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. | |
1081 |
|
1087 | |||
1082 | * IPython/completer.py (IPCompleter.complete): small patch to help |
|
1088 | * IPython/completer.py (IPCompleter.complete): small patch to help | |
1083 | tab-completion under Emacs, after a suggestion by John Barnard |
|
1089 | tab-completion under Emacs, after a suggestion by John Barnard | |
1084 | <barnarj-AT-ccf.org>. |
|
1090 | <barnarj-AT-ccf.org>. | |
1085 |
|
1091 | |||
1086 | * IPython/Magic.py (Magic.extract_input_slices): added support for |
|
1092 | * IPython/Magic.py (Magic.extract_input_slices): added support for | |
1087 | the slice notation in magics to use N-M to represent numbers N...M |
|
1093 | the slice notation in magics to use N-M to represent numbers N...M | |
1088 | (closed endpoints). This is used by %macro and %save. |
|
1094 | (closed endpoints). This is used by %macro and %save. | |
1089 |
|
1095 | |||
1090 | * IPython/completer.py (Completer.attr_matches): for modules which |
|
1096 | * IPython/completer.py (Completer.attr_matches): for modules which | |
1091 | define __all__, complete only on those. After a patch by Jeffrey |
|
1097 | define __all__, complete only on those. After a patch by Jeffrey | |
1092 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and |
|
1098 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and | |
1093 | speed up this routine. |
|
1099 | speed up this routine. | |
1094 |
|
1100 | |||
1095 | * IPython/Logger.py (Logger.log): fix a history handling bug. I |
|
1101 | * IPython/Logger.py (Logger.log): fix a history handling bug. I | |
1096 | don't know if this is the end of it, but the behavior now is |
|
1102 | don't know if this is the end of it, but the behavior now is | |
1097 | certainly much more correct. Note that coupled with macros, |
|
1103 | certainly much more correct. Note that coupled with macros, | |
1098 | slightly surprising (at first) behavior may occur: a macro will in |
|
1104 | slightly surprising (at first) behavior may occur: a macro will in | |
1099 | general expand to multiple lines of input, so upon exiting, the |
|
1105 | general expand to multiple lines of input, so upon exiting, the | |
1100 | in/out counters will both be bumped by the corresponding amount |
|
1106 | in/out counters will both be bumped by the corresponding amount | |
1101 | (as if the macro's contents had been typed interactively). Typing |
|
1107 | (as if the macro's contents had been typed interactively). Typing | |
1102 | %hist will reveal the intermediate (silently processed) lines. |
|
1108 | %hist will reveal the intermediate (silently processed) lines. | |
1103 |
|
1109 | |||
1104 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause |
|
1110 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause | |
1105 | pickle to fail (%run was overwriting __main__ and not restoring |
|
1111 | pickle to fail (%run was overwriting __main__ and not restoring | |
1106 | it, but pickle relies on __main__ to operate). |
|
1112 | it, but pickle relies on __main__ to operate). | |
1107 |
|
1113 | |||
1108 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now |
|
1114 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now | |
1109 | using properties, but forgot to make the main InteractiveShell |
|
1115 | using properties, but forgot to make the main InteractiveShell | |
1110 | class a new-style class. Properties fail silently, and |
|
1116 | class a new-style class. Properties fail silently, and | |
1111 | mysteriously, with old-style class (getters work, but |
|
1117 | mysteriously, with old-style class (getters work, but | |
1112 | setters don't do anything). |
|
1118 | setters don't do anything). | |
1113 |
|
1119 | |||
1114 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1120 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
1115 |
|
1121 | |||
1116 | * IPython/Magic.py (magic_history): fix history reporting bug (I |
|
1122 | * IPython/Magic.py (magic_history): fix history reporting bug (I | |
1117 | know some nasties are still there, I just can't seem to find a |
|
1123 | know some nasties are still there, I just can't seem to find a | |
1118 | reproducible test case to track them down; the input history is |
|
1124 | reproducible test case to track them down; the input history is | |
1119 | falling out of sync...) |
|
1125 | falling out of sync...) | |
1120 |
|
1126 | |||
1121 | * IPython/iplib.py (handle_shell_escape): fix bug where both |
|
1127 | * IPython/iplib.py (handle_shell_escape): fix bug where both | |
1122 | aliases and system accesses where broken for indented code (such |
|
1128 | aliases and system accesses where broken for indented code (such | |
1123 | as loops). |
|
1129 | as loops). | |
1124 |
|
1130 | |||
1125 | * IPython/genutils.py (shell): fix small but critical bug for |
|
1131 | * IPython/genutils.py (shell): fix small but critical bug for | |
1126 | win32 system access. |
|
1132 | win32 system access. | |
1127 |
|
1133 | |||
1128 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1134 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1129 |
|
1135 | |||
1130 | * IPython/iplib.py (showtraceback): remove use of the |
|
1136 | * IPython/iplib.py (showtraceback): remove use of the | |
1131 | sys.last_{type/value/traceback} structures, which are non |
|
1137 | sys.last_{type/value/traceback} structures, which are non | |
1132 | thread-safe. |
|
1138 | thread-safe. | |
1133 | (_prefilter): change control flow to ensure that we NEVER |
|
1139 | (_prefilter): change control flow to ensure that we NEVER | |
1134 | introspect objects when autocall is off. This will guarantee that |
|
1140 | introspect objects when autocall is off. This will guarantee that | |
1135 | having an input line of the form 'x.y', where access to attribute |
|
1141 | having an input line of the form 'x.y', where access to attribute | |
1136 | 'y' has side effects, doesn't trigger the side effect TWICE. It |
|
1142 | 'y' has side effects, doesn't trigger the side effect TWICE. It | |
1137 | is important to note that, with autocall on, these side effects |
|
1143 | is important to note that, with autocall on, these side effects | |
1138 | can still happen. |
|
1144 | can still happen. | |
1139 | (ipsystem): new builtin, to complete the ip{magic/alias/system} |
|
1145 | (ipsystem): new builtin, to complete the ip{magic/alias/system} | |
1140 | trio. IPython offers these three kinds of special calls which are |
|
1146 | trio. IPython offers these three kinds of special calls which are | |
1141 | not python code, and it's a good thing to have their call method |
|
1147 | not python code, and it's a good thing to have their call method | |
1142 | be accessible as pure python functions (not just special syntax at |
|
1148 | be accessible as pure python functions (not just special syntax at | |
1143 | the command line). It gives us a better internal implementation |
|
1149 | the command line). It gives us a better internal implementation | |
1144 | structure, as well as exposing these for user scripting more |
|
1150 | structure, as well as exposing these for user scripting more | |
1145 | cleanly. |
|
1151 | cleanly. | |
1146 |
|
1152 | |||
1147 | * IPython/macro.py (Macro.__init__): moved macros to a standalone |
|
1153 | * IPython/macro.py (Macro.__init__): moved macros to a standalone | |
1148 | file. Now that they'll be more likely to be used with the |
|
1154 | file. Now that they'll be more likely to be used with the | |
1149 | persistance system (%store), I want to make sure their module path |
|
1155 | persistance system (%store), I want to make sure their module path | |
1150 | doesn't change in the future, so that we don't break things for |
|
1156 | doesn't change in the future, so that we don't break things for | |
1151 | users' persisted data. |
|
1157 | users' persisted data. | |
1152 |
|
1158 | |||
1153 | * IPython/iplib.py (autoindent_update): move indentation |
|
1159 | * IPython/iplib.py (autoindent_update): move indentation | |
1154 | management into the _text_ processing loop, not the keyboard |
|
1160 | management into the _text_ processing loop, not the keyboard | |
1155 | interactive one. This is necessary to correctly process non-typed |
|
1161 | interactive one. This is necessary to correctly process non-typed | |
1156 | multiline input (such as macros). |
|
1162 | multiline input (such as macros). | |
1157 |
|
1163 | |||
1158 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der |
|
1164 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der | |
1159 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, |
|
1165 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, | |
1160 | which was producing problems in the resulting manual. |
|
1166 | which was producing problems in the resulting manual. | |
1161 | (magic_whos): improve reporting of instances (show their class, |
|
1167 | (magic_whos): improve reporting of instances (show their class, | |
1162 | instead of simply printing 'instance' which isn't terribly |
|
1168 | instead of simply printing 'instance' which isn't terribly | |
1163 | informative). |
|
1169 | informative). | |
1164 |
|
1170 | |||
1165 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch |
|
1171 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch | |
1166 | (minor mods) to support network shares under win32. |
|
1172 | (minor mods) to support network shares under win32. | |
1167 |
|
1173 | |||
1168 | * IPython/winconsole.py (get_console_size): add new winconsole |
|
1174 | * IPython/winconsole.py (get_console_size): add new winconsole | |
1169 | module and fixes to page_dumb() to improve its behavior under |
|
1175 | module and fixes to page_dumb() to improve its behavior under | |
1170 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. |
|
1176 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. | |
1171 |
|
1177 | |||
1172 | * IPython/Magic.py (Macro): simplified Macro class to just |
|
1178 | * IPython/Magic.py (Macro): simplified Macro class to just | |
1173 | subclass list. We've had only 2.2 compatibility for a very long |
|
1179 | subclass list. We've had only 2.2 compatibility for a very long | |
1174 | time, yet I was still avoiding subclassing the builtin types. No |
|
1180 | time, yet I was still avoiding subclassing the builtin types. No | |
1175 | more (I'm also starting to use properties, though I won't shift to |
|
1181 | more (I'm also starting to use properties, though I won't shift to | |
1176 | 2.3-specific features quite yet). |
|
1182 | 2.3-specific features quite yet). | |
1177 | (magic_store): added Ville's patch for lightweight variable |
|
1183 | (magic_store): added Ville's patch for lightweight variable | |
1178 | persistence, after a request on the user list by Matt Wilkie |
|
1184 | persistence, after a request on the user list by Matt Wilkie | |
1179 | <maphew-AT-gmail.com>. The new %store magic's docstring has full |
|
1185 | <maphew-AT-gmail.com>. The new %store magic's docstring has full | |
1180 | details. |
|
1186 | details. | |
1181 |
|
1187 | |||
1182 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1188 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1183 | changed the default logfile name from 'ipython.log' to |
|
1189 | changed the default logfile name from 'ipython.log' to | |
1184 | 'ipython_log.py'. These logs are real python files, and now that |
|
1190 | 'ipython_log.py'. These logs are real python files, and now that | |
1185 | we have much better multiline support, people are more likely to |
|
1191 | we have much better multiline support, people are more likely to | |
1186 | want to use them as such. Might as well name them correctly. |
|
1192 | want to use them as such. Might as well name them correctly. | |
1187 |
|
1193 | |||
1188 | * IPython/Magic.py: substantial cleanup. While we can't stop |
|
1194 | * IPython/Magic.py: substantial cleanup. While we can't stop | |
1189 | using magics as mixins, due to the existing customizations 'out |
|
1195 | using magics as mixins, due to the existing customizations 'out | |
1190 | there' which rely on the mixin naming conventions, at least I |
|
1196 | there' which rely on the mixin naming conventions, at least I | |
1191 | cleaned out all cross-class name usage. So once we are OK with |
|
1197 | cleaned out all cross-class name usage. So once we are OK with | |
1192 | breaking compatibility, the two systems can be separated. |
|
1198 | breaking compatibility, the two systems can be separated. | |
1193 |
|
1199 | |||
1194 | * IPython/Logger.py: major cleanup. This one is NOT a mixin |
|
1200 | * IPython/Logger.py: major cleanup. This one is NOT a mixin | |
1195 | anymore, and the class is a fair bit less hideous as well. New |
|
1201 | anymore, and the class is a fair bit less hideous as well. New | |
1196 | features were also introduced: timestamping of input, and logging |
|
1202 | features were also introduced: timestamping of input, and logging | |
1197 | of output results. These are user-visible with the -t and -o |
|
1203 | of output results. These are user-visible with the -t and -o | |
1198 | options to %logstart. Closes |
|
1204 | options to %logstart. Closes | |
1199 | http://www.scipy.net/roundup/ipython/issue11 and a request by |
|
1205 | http://www.scipy.net/roundup/ipython/issue11 and a request by | |
1200 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). |
|
1206 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). | |
1201 |
|
1207 | |||
1202 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1208 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
1203 |
|
1209 | |||
1204 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to |
|
1210 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to | |
1205 | better handle backslashes in paths. See the thread 'More Windows |
|
1211 | better handle backslashes in paths. See the thread 'More Windows | |
1206 | questions part 2 - \/ characters revisited' on the iypthon user |
|
1212 | questions part 2 - \/ characters revisited' on the iypthon user | |
1207 | list: |
|
1213 | list: | |
1208 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html |
|
1214 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html | |
1209 |
|
1215 | |||
1210 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. |
|
1216 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. | |
1211 |
|
1217 | |||
1212 | (InteractiveShell.__init__): change threaded shells to not use the |
|
1218 | (InteractiveShell.__init__): change threaded shells to not use the | |
1213 | ipython crash handler. This was causing more problems than not, |
|
1219 | ipython crash handler. This was causing more problems than not, | |
1214 | as exceptions in the main thread (GUI code, typically) would |
|
1220 | as exceptions in the main thread (GUI code, typically) would | |
1215 | always show up as a 'crash', when they really weren't. |
|
1221 | always show up as a 'crash', when they really weren't. | |
1216 |
|
1222 | |||
1217 | The colors and exception mode commands (%colors/%xmode) have been |
|
1223 | The colors and exception mode commands (%colors/%xmode) have been | |
1218 | synchronized to also take this into account, so users can get |
|
1224 | synchronized to also take this into account, so users can get | |
1219 | verbose exceptions for their threaded code as well. I also added |
|
1225 | verbose exceptions for their threaded code as well. I also added | |
1220 | support for activating pdb inside this exception handler as well, |
|
1226 | support for activating pdb inside this exception handler as well, | |
1221 | so now GUI authors can use IPython's enhanced pdb at runtime. |
|
1227 | so now GUI authors can use IPython's enhanced pdb at runtime. | |
1222 |
|
1228 | |||
1223 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag |
|
1229 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag | |
1224 | true by default, and add it to the shipped ipythonrc file. Since |
|
1230 | true by default, and add it to the shipped ipythonrc file. Since | |
1225 | this asks the user before proceeding, I think it's OK to make it |
|
1231 | this asks the user before proceeding, I think it's OK to make it | |
1226 | true by default. |
|
1232 | true by default. | |
1227 |
|
1233 | |||
1228 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead |
|
1234 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead | |
1229 | of the previous special-casing of input in the eval loop. I think |
|
1235 | of the previous special-casing of input in the eval loop. I think | |
1230 | this is cleaner, as they really are commands and shouldn't have |
|
1236 | this is cleaner, as they really are commands and shouldn't have | |
1231 | a special role in the middle of the core code. |
|
1237 | a special role in the middle of the core code. | |
1232 |
|
1238 | |||
1233 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1239 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1234 |
|
1240 | |||
1235 | * IPython/iplib.py (edit_syntax_error): added support for |
|
1241 | * IPython/iplib.py (edit_syntax_error): added support for | |
1236 | automatically reopening the editor if the file had a syntax error |
|
1242 | automatically reopening the editor if the file had a syntax error | |
1237 | in it. Thanks to scottt who provided the patch at: |
|
1243 | in it. Thanks to scottt who provided the patch at: | |
1238 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified |
|
1244 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified | |
1239 | version committed). |
|
1245 | version committed). | |
1240 |
|
1246 | |||
1241 | * IPython/iplib.py (handle_normal): add suport for multi-line |
|
1247 | * IPython/iplib.py (handle_normal): add suport for multi-line | |
1242 | input with emtpy lines. This fixes |
|
1248 | input with emtpy lines. This fixes | |
1243 | http://www.scipy.net/roundup/ipython/issue43 and a similar |
|
1249 | http://www.scipy.net/roundup/ipython/issue43 and a similar | |
1244 | discussion on the user list. |
|
1250 | discussion on the user list. | |
1245 |
|
1251 | |||
1246 | WARNING: a behavior change is necessarily introduced to support |
|
1252 | WARNING: a behavior change is necessarily introduced to support | |
1247 | blank lines: now a single blank line with whitespace does NOT |
|
1253 | blank lines: now a single blank line with whitespace does NOT | |
1248 | break the input loop, which means that when autoindent is on, by |
|
1254 | break the input loop, which means that when autoindent is on, by | |
1249 | default hitting return on the next (indented) line does NOT exit. |
|
1255 | default hitting return on the next (indented) line does NOT exit. | |
1250 |
|
1256 | |||
1251 | Instead, to exit a multiline input you can either have: |
|
1257 | Instead, to exit a multiline input you can either have: | |
1252 |
|
1258 | |||
1253 | - TWO whitespace lines (just hit return again), or |
|
1259 | - TWO whitespace lines (just hit return again), or | |
1254 | - a single whitespace line of a different length than provided |
|
1260 | - a single whitespace line of a different length than provided | |
1255 | by the autoindent (add or remove a space). |
|
1261 | by the autoindent (add or remove a space). | |
1256 |
|
1262 | |||
1257 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' |
|
1263 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' | |
1258 | module to better organize all readline-related functionality. |
|
1264 | module to better organize all readline-related functionality. | |
1259 | I've deleted FlexCompleter and put all completion clases here. |
|
1265 | I've deleted FlexCompleter and put all completion clases here. | |
1260 |
|
1266 | |||
1261 | * IPython/iplib.py (raw_input): improve indentation management. |
|
1267 | * IPython/iplib.py (raw_input): improve indentation management. | |
1262 | It is now possible to paste indented code with autoindent on, and |
|
1268 | It is now possible to paste indented code with autoindent on, and | |
1263 | the code is interpreted correctly (though it still looks bad on |
|
1269 | the code is interpreted correctly (though it still looks bad on | |
1264 | screen, due to the line-oriented nature of ipython). |
|
1270 | screen, due to the line-oriented nature of ipython). | |
1265 | (MagicCompleter.complete): change behavior so that a TAB key on an |
|
1271 | (MagicCompleter.complete): change behavior so that a TAB key on an | |
1266 | otherwise empty line actually inserts a tab, instead of completing |
|
1272 | otherwise empty line actually inserts a tab, instead of completing | |
1267 | on the entire global namespace. This makes it easier to use the |
|
1273 | on the entire global namespace. This makes it easier to use the | |
1268 | TAB key for indentation. After a request by Hans Meine |
|
1274 | TAB key for indentation. After a request by Hans Meine | |
1269 | <hans_meine-AT-gmx.net> |
|
1275 | <hans_meine-AT-gmx.net> | |
1270 | (_prefilter): add support so that typing plain 'exit' or 'quit' |
|
1276 | (_prefilter): add support so that typing plain 'exit' or 'quit' | |
1271 | does a sensible thing. Originally I tried to deviate as little as |
|
1277 | does a sensible thing. Originally I tried to deviate as little as | |
1272 | possible from the default python behavior, but even that one may |
|
1278 | possible from the default python behavior, but even that one may | |
1273 | change in this direction (thread on python-dev to that effect). |
|
1279 | change in this direction (thread on python-dev to that effect). | |
1274 | Regardless, ipython should do the right thing even if CPython's |
|
1280 | Regardless, ipython should do the right thing even if CPython's | |
1275 | '>>>' prompt doesn't. |
|
1281 | '>>>' prompt doesn't. | |
1276 | (InteractiveShell): removed subclassing code.InteractiveConsole |
|
1282 | (InteractiveShell): removed subclassing code.InteractiveConsole | |
1277 | class. By now we'd overridden just about all of its methods: I've |
|
1283 | class. By now we'd overridden just about all of its methods: I've | |
1278 | copied the remaining two over, and now ipython is a standalone |
|
1284 | copied the remaining two over, and now ipython is a standalone | |
1279 | class. This will provide a clearer picture for the chainsaw |
|
1285 | class. This will provide a clearer picture for the chainsaw | |
1280 | branch refactoring. |
|
1286 | branch refactoring. | |
1281 |
|
1287 | |||
1282 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1288 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
1283 |
|
1289 | |||
1284 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against |
|
1290 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against | |
1285 | failures for objects which break when dir() is called on them. |
|
1291 | failures for objects which break when dir() is called on them. | |
1286 |
|
1292 | |||
1287 | * IPython/FlexCompleter.py (Completer.__init__): Added support for |
|
1293 | * IPython/FlexCompleter.py (Completer.__init__): Added support for | |
1288 | distinct local and global namespaces in the completer API. This |
|
1294 | distinct local and global namespaces in the completer API. This | |
1289 | change allows us to properly handle completion with distinct |
|
1295 | change allows us to properly handle completion with distinct | |
1290 | scopes, including in embedded instances (this had never really |
|
1296 | scopes, including in embedded instances (this had never really | |
1291 | worked correctly). |
|
1297 | worked correctly). | |
1292 |
|
1298 | |||
1293 | Note: this introduces a change in the constructor for |
|
1299 | Note: this introduces a change in the constructor for | |
1294 | MagicCompleter, as a new global_namespace parameter is now the |
|
1300 | MagicCompleter, as a new global_namespace parameter is now the | |
1295 | second argument (the others were bumped one position). |
|
1301 | second argument (the others were bumped one position). | |
1296 |
|
1302 | |||
1297 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1303 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
1298 |
|
1304 | |||
1299 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
1305 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
1300 | embedded instances (which can be done now thanks to Vivian's |
|
1306 | embedded instances (which can be done now thanks to Vivian's | |
1301 | frame-handling fixes for pdb). |
|
1307 | frame-handling fixes for pdb). | |
1302 | (InteractiveShell.__init__): Fix namespace handling problem in |
|
1308 | (InteractiveShell.__init__): Fix namespace handling problem in | |
1303 | embedded instances. We were overwriting __main__ unconditionally, |
|
1309 | embedded instances. We were overwriting __main__ unconditionally, | |
1304 | and this should only be done for 'full' (non-embedded) IPython; |
|
1310 | and this should only be done for 'full' (non-embedded) IPython; | |
1305 | embedded instances must respect the caller's __main__. Thanks to |
|
1311 | embedded instances must respect the caller's __main__. Thanks to | |
1306 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> |
|
1312 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> | |
1307 |
|
1313 | |||
1308 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1314 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1309 |
|
1315 | |||
1310 | * setup.py: added download_url to setup(). This registers the |
|
1316 | * setup.py: added download_url to setup(). This registers the | |
1311 | download address at PyPI, which is not only useful to humans |
|
1317 | download address at PyPI, which is not only useful to humans | |
1312 | browsing the site, but is also picked up by setuptools (the Eggs |
|
1318 | browsing the site, but is also picked up by setuptools (the Eggs | |
1313 | machinery). Thanks to Ville and R. Kern for the info/discussion |
|
1319 | machinery). Thanks to Ville and R. Kern for the info/discussion | |
1314 | on this. |
|
1320 | on this. | |
1315 |
|
1321 | |||
1316 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1322 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1317 |
|
1323 | |||
1318 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. |
|
1324 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. | |
1319 | This brings a lot of nice functionality to the pdb mode, which now |
|
1325 | This brings a lot of nice functionality to the pdb mode, which now | |
1320 | has tab-completion, syntax highlighting, and better stack handling |
|
1326 | has tab-completion, syntax highlighting, and better stack handling | |
1321 | than before. Many thanks to Vivian De Smedt |
|
1327 | than before. Many thanks to Vivian De Smedt | |
1322 | <vivian-AT-vdesmedt.com> for the original patches. |
|
1328 | <vivian-AT-vdesmedt.com> for the original patches. | |
1323 |
|
1329 | |||
1324 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1330 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
1325 |
|
1331 | |||
1326 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling |
|
1332 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling | |
1327 | sequence to consistently accept the banner argument. The |
|
1333 | sequence to consistently accept the banner argument. The | |
1328 | inconsistency was tripping SAGE, thanks to Gary Zablackis |
|
1334 | inconsistency was tripping SAGE, thanks to Gary Zablackis | |
1329 | <gzabl-AT-yahoo.com> for the report. |
|
1335 | <gzabl-AT-yahoo.com> for the report. | |
1330 |
|
1336 | |||
1331 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1337 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1332 |
|
1338 | |||
1333 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1339 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1334 | Fix bug where a naked 'alias' call in the ipythonrc file would |
|
1340 | Fix bug where a naked 'alias' call in the ipythonrc file would | |
1335 | cause a crash. Bug reported by Jorgen Stenarson. |
|
1341 | cause a crash. Bug reported by Jorgen Stenarson. | |
1336 |
|
1342 | |||
1337 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1343 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1338 |
|
1344 | |||
1339 | * IPython/ipmaker.py (make_IPython): cleanups which should improve |
|
1345 | * IPython/ipmaker.py (make_IPython): cleanups which should improve | |
1340 | startup time. |
|
1346 | startup time. | |
1341 |
|
1347 | |||
1342 | * IPython/iplib.py (runcode): my globals 'fix' for embedded |
|
1348 | * IPython/iplib.py (runcode): my globals 'fix' for embedded | |
1343 | instances had introduced a bug with globals in normal code. Now |
|
1349 | instances had introduced a bug with globals in normal code. Now | |
1344 | it's working in all cases. |
|
1350 | it's working in all cases. | |
1345 |
|
1351 | |||
1346 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and |
|
1352 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and | |
1347 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' |
|
1353 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' | |
1348 | has been introduced to set the default case sensitivity of the |
|
1354 | has been introduced to set the default case sensitivity of the | |
1349 | searches. Users can still select either mode at runtime on a |
|
1355 | searches. Users can still select either mode at runtime on a | |
1350 | per-search basis. |
|
1356 | per-search basis. | |
1351 |
|
1357 | |||
1352 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1358 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1353 |
|
1359 | |||
1354 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of |
|
1360 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of | |
1355 | attributes in wildcard searches for subclasses. Modified version |
|
1361 | attributes in wildcard searches for subclasses. Modified version | |
1356 | of a patch by Jorgen. |
|
1362 | of a patch by Jorgen. | |
1357 |
|
1363 | |||
1358 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1364 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1359 |
|
1365 | |||
1360 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for |
|
1366 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for | |
1361 | embedded instances. I added a user_global_ns attribute to the |
|
1367 | embedded instances. I added a user_global_ns attribute to the | |
1362 | InteractiveShell class to handle this. |
|
1368 | InteractiveShell class to handle this. | |
1363 |
|
1369 | |||
1364 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1370 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1365 |
|
1371 | |||
1366 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to |
|
1372 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to | |
1367 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 |
|
1373 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 | |
1368 | (reported under win32, but may happen also in other platforms). |
|
1374 | (reported under win32, but may happen also in other platforms). | |
1369 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> |
|
1375 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> | |
1370 |
|
1376 | |||
1371 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1377 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1372 |
|
1378 | |||
1373 | * IPython/Magic.py (magic_psearch): new support for wildcard |
|
1379 | * IPython/Magic.py (magic_psearch): new support for wildcard | |
1374 | patterns. Now, typing ?a*b will list all names which begin with a |
|
1380 | patterns. Now, typing ?a*b will list all names which begin with a | |
1375 | and end in b, for example. The %psearch magic has full |
|
1381 | and end in b, for example. The %psearch magic has full | |
1376 | docstrings. Many thanks to JΓΆrgen Stenarson |
|
1382 | docstrings. Many thanks to JΓΆrgen Stenarson | |
1377 | <jorgen.stenarson-AT-bostream.nu>, author of the patches |
|
1383 | <jorgen.stenarson-AT-bostream.nu>, author of the patches | |
1378 | implementing this functionality. |
|
1384 | implementing this functionality. | |
1379 |
|
1385 | |||
1380 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1386 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1381 |
|
1387 | |||
1382 | * Manual: fixed long-standing annoyance of double-dashes (as in |
|
1388 | * Manual: fixed long-standing annoyance of double-dashes (as in | |
1383 | --prefix=~, for example) being stripped in the HTML version. This |
|
1389 | --prefix=~, for example) being stripped in the HTML version. This | |
1384 | is a latex2html bug, but a workaround was provided. Many thanks |
|
1390 | is a latex2html bug, but a workaround was provided. Many thanks | |
1385 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed |
|
1391 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed | |
1386 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball |
|
1392 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball | |
1387 | rolling. This seemingly small issue had tripped a number of users |
|
1393 | rolling. This seemingly small issue had tripped a number of users | |
1388 | when first installing, so I'm glad to see it gone. |
|
1394 | when first installing, so I'm glad to see it gone. | |
1389 |
|
1395 | |||
1390 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1396 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1391 |
|
1397 | |||
1392 | * IPython/Extensions/numeric_formats.py: fix missing import, |
|
1398 | * IPython/Extensions/numeric_formats.py: fix missing import, | |
1393 | reported by Stephen Walton. |
|
1399 | reported by Stephen Walton. | |
1394 |
|
1400 | |||
1395 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1401 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1396 |
|
1402 | |||
1397 | * IPython/demo.py: finish demo module, fully documented now. |
|
1403 | * IPython/demo.py: finish demo module, fully documented now. | |
1398 |
|
1404 | |||
1399 | * IPython/genutils.py (file_read): simple little utility to read a |
|
1405 | * IPython/genutils.py (file_read): simple little utility to read a | |
1400 | file and ensure it's closed afterwards. |
|
1406 | file and ensure it's closed afterwards. | |
1401 |
|
1407 | |||
1402 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1408 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1403 |
|
1409 | |||
1404 | * IPython/demo.py (Demo.__init__): added support for individually |
|
1410 | * IPython/demo.py (Demo.__init__): added support for individually | |
1405 | tagging blocks for automatic execution. |
|
1411 | tagging blocks for automatic execution. | |
1406 |
|
1412 | |||
1407 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing |
|
1413 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing | |
1408 | syntax-highlighted python sources, requested by John. |
|
1414 | syntax-highlighted python sources, requested by John. | |
1409 |
|
1415 | |||
1410 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1416 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
1411 |
|
1417 | |||
1412 | * IPython/demo.py (Demo.again): fix bug where again() blocks after |
|
1418 | * IPython/demo.py (Demo.again): fix bug where again() blocks after | |
1413 | finishing. |
|
1419 | finishing. | |
1414 |
|
1420 | |||
1415 | * IPython/genutils.py (shlex_split): moved from Magic to here, |
|
1421 | * IPython/genutils.py (shlex_split): moved from Magic to here, | |
1416 | where all 2.2 compatibility stuff lives. I needed it for demo.py. |
|
1422 | where all 2.2 compatibility stuff lives. I needed it for demo.py. | |
1417 |
|
1423 | |||
1418 | * IPython/demo.py (Demo.__init__): added support for silent |
|
1424 | * IPython/demo.py (Demo.__init__): added support for silent | |
1419 | blocks, improved marks as regexps, docstrings written. |
|
1425 | blocks, improved marks as regexps, docstrings written. | |
1420 | (Demo.__init__): better docstring, added support for sys.argv. |
|
1426 | (Demo.__init__): better docstring, added support for sys.argv. | |
1421 |
|
1427 | |||
1422 | * IPython/genutils.py (marquee): little utility used by the demo |
|
1428 | * IPython/genutils.py (marquee): little utility used by the demo | |
1423 | code, handy in general. |
|
1429 | code, handy in general. | |
1424 |
|
1430 | |||
1425 | * IPython/demo.py (Demo.__init__): new class for interactive |
|
1431 | * IPython/demo.py (Demo.__init__): new class for interactive | |
1426 | demos. Not documented yet, I just wrote it in a hurry for |
|
1432 | demos. Not documented yet, I just wrote it in a hurry for | |
1427 | scipy'05. Will docstring later. |
|
1433 | scipy'05. Will docstring later. | |
1428 |
|
1434 | |||
1429 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1435 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
1430 |
|
1436 | |||
1431 | * IPython/Shell.py (sigint_handler): Drastic simplification which |
|
1437 | * IPython/Shell.py (sigint_handler): Drastic simplification which | |
1432 | also seems to make Ctrl-C work correctly across threads! This is |
|
1438 | also seems to make Ctrl-C work correctly across threads! This is | |
1433 | so simple, that I can't beleive I'd missed it before. Needs more |
|
1439 | so simple, that I can't beleive I'd missed it before. Needs more | |
1434 | testing, though. |
|
1440 | testing, though. | |
1435 | (KBINT): Never mind, revert changes. I'm sure I'd tried something |
|
1441 | (KBINT): Never mind, revert changes. I'm sure I'd tried something | |
1436 | like this before... |
|
1442 | like this before... | |
1437 |
|
1443 | |||
1438 | * IPython/genutils.py (get_home_dir): add protection against |
|
1444 | * IPython/genutils.py (get_home_dir): add protection against | |
1439 | non-dirs in win32 registry. |
|
1445 | non-dirs in win32 registry. | |
1440 |
|
1446 | |||
1441 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix |
|
1447 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix | |
1442 | bug where dict was mutated while iterating (pysh crash). |
|
1448 | bug where dict was mutated while iterating (pysh crash). | |
1443 |
|
1449 | |||
1444 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1450 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
1445 |
|
1451 | |||
1446 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from |
|
1452 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from | |
1447 | spurious newlines added by this routine. After a report by |
|
1453 | spurious newlines added by this routine. After a report by | |
1448 | F. Mantegazza. |
|
1454 | F. Mantegazza. | |
1449 |
|
1455 | |||
1450 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1456 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
1451 |
|
1457 | |||
1452 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") |
|
1458 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |
1453 | calls. These were a leftover from the GTK 1.x days, and can cause |
|
1459 | calls. These were a leftover from the GTK 1.x days, and can cause | |
1454 | problems in certain cases (after a report by John Hunter). |
|
1460 | problems in certain cases (after a report by John Hunter). | |
1455 |
|
1461 | |||
1456 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if |
|
1462 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |
1457 | os.getcwd() fails at init time. Thanks to patch from David Remahl |
|
1463 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |
1458 | <chmod007-AT-mac.com>. |
|
1464 | <chmod007-AT-mac.com>. | |
1459 | (InteractiveShell.__init__): prevent certain special magics from |
|
1465 | (InteractiveShell.__init__): prevent certain special magics from | |
1460 | being shadowed by aliases. Closes |
|
1466 | being shadowed by aliases. Closes | |
1461 | http://www.scipy.net/roundup/ipython/issue41. |
|
1467 | http://www.scipy.net/roundup/ipython/issue41. | |
1462 |
|
1468 | |||
1463 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1469 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1464 |
|
1470 | |||
1465 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
1471 | * IPython/iplib.py (InteractiveShell.complete): Added new | |
1466 | top-level completion method to expose the completion mechanism |
|
1472 | top-level completion method to expose the completion mechanism | |
1467 | beyond readline-based environments. |
|
1473 | beyond readline-based environments. | |
1468 |
|
1474 | |||
1469 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1475 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
1470 |
|
1476 | |||
1471 | * tools/ipsvnc (svnversion): fix svnversion capture. |
|
1477 | * tools/ipsvnc (svnversion): fix svnversion capture. | |
1472 |
|
1478 | |||
1473 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline |
|
1479 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline | |
1474 | attribute to self, which was missing. Before, it was set by a |
|
1480 | attribute to self, which was missing. Before, it was set by a | |
1475 | routine which in certain cases wasn't being called, so the |
|
1481 | routine which in certain cases wasn't being called, so the | |
1476 | instance could end up missing the attribute. This caused a crash. |
|
1482 | instance could end up missing the attribute. This caused a crash. | |
1477 | Closes http://www.scipy.net/roundup/ipython/issue40. |
|
1483 | Closes http://www.scipy.net/roundup/ipython/issue40. | |
1478 |
|
1484 | |||
1479 | 2005-08-16 Fernando Perez <fperez@colorado.edu> |
|
1485 | 2005-08-16 Fernando Perez <fperez@colorado.edu> | |
1480 |
|
1486 | |||
1481 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object |
|
1487 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object | |
1482 | contains non-string attribute. Closes |
|
1488 | contains non-string attribute. Closes | |
1483 | http://www.scipy.net/roundup/ipython/issue38. |
|
1489 | http://www.scipy.net/roundup/ipython/issue38. | |
1484 |
|
1490 | |||
1485 | 2005-08-14 Fernando Perez <fperez@colorado.edu> |
|
1491 | 2005-08-14 Fernando Perez <fperez@colorado.edu> | |
1486 |
|
1492 | |||
1487 | * tools/ipsvnc: Minor improvements, to add changeset info. |
|
1493 | * tools/ipsvnc: Minor improvements, to add changeset info. | |
1488 |
|
1494 | |||
1489 | 2005-08-12 Fernando Perez <fperez@colorado.edu> |
|
1495 | 2005-08-12 Fernando Perez <fperez@colorado.edu> | |
1490 |
|
1496 | |||
1491 | * IPython/iplib.py (runsource): remove self.code_to_run_src |
|
1497 | * IPython/iplib.py (runsource): remove self.code_to_run_src | |
1492 | attribute. I realized this is nothing more than |
|
1498 | attribute. I realized this is nothing more than | |
1493 | '\n'.join(self.buffer), and having the same data in two different |
|
1499 | '\n'.join(self.buffer), and having the same data in two different | |
1494 | places is just asking for synchronization bugs. This may impact |
|
1500 | places is just asking for synchronization bugs. This may impact | |
1495 | people who have custom exception handlers, so I need to warn |
|
1501 | people who have custom exception handlers, so I need to warn | |
1496 | ipython-dev about it (F. Mantegazza may use them). |
|
1502 | ipython-dev about it (F. Mantegazza may use them). | |
1497 |
|
1503 | |||
1498 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1504 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1499 |
|
1505 | |||
1500 | * IPython/genutils.py: fix 2.2 compatibility (generators) |
|
1506 | * IPython/genutils.py: fix 2.2 compatibility (generators) | |
1501 |
|
1507 | |||
1502 | 2005-07-18 Fernando Perez <fperez@colorado.edu> |
|
1508 | 2005-07-18 Fernando Perez <fperez@colorado.edu> | |
1503 |
|
1509 | |||
1504 | * IPython/genutils.py (get_home_dir): fix to help users with |
|
1510 | * IPython/genutils.py (get_home_dir): fix to help users with | |
1505 | invalid $HOME under win32. |
|
1511 | invalid $HOME under win32. | |
1506 |
|
1512 | |||
1507 | 2005-07-17 Fernando Perez <fperez@colorado.edu> |
|
1513 | 2005-07-17 Fernando Perez <fperez@colorado.edu> | |
1508 |
|
1514 | |||
1509 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove |
|
1515 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove | |
1510 | some old hacks and clean up a bit other routines; code should be |
|
1516 | some old hacks and clean up a bit other routines; code should be | |
1511 | simpler and a bit faster. |
|
1517 | simpler and a bit faster. | |
1512 |
|
1518 | |||
1513 | * IPython/iplib.py (interact): removed some last-resort attempts |
|
1519 | * IPython/iplib.py (interact): removed some last-resort attempts | |
1514 | to survive broken stdout/stderr. That code was only making it |
|
1520 | to survive broken stdout/stderr. That code was only making it | |
1515 | harder to abstract out the i/o (necessary for gui integration), |
|
1521 | harder to abstract out the i/o (necessary for gui integration), | |
1516 | and the crashes it could prevent were extremely rare in practice |
|
1522 | and the crashes it could prevent were extremely rare in practice | |
1517 | (besides being fully user-induced in a pretty violent manner). |
|
1523 | (besides being fully user-induced in a pretty violent manner). | |
1518 |
|
1524 | |||
1519 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. |
|
1525 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. | |
1520 | Nothing major yet, but the code is simpler to read; this should |
|
1526 | Nothing major yet, but the code is simpler to read; this should | |
1521 | make it easier to do more serious modifications in the future. |
|
1527 | make it easier to do more serious modifications in the future. | |
1522 |
|
1528 | |||
1523 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, |
|
1529 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, | |
1524 | which broke in .15 (thanks to a report by Ville). |
|
1530 | which broke in .15 (thanks to a report by Ville). | |
1525 |
|
1531 | |||
1526 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not |
|
1532 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not | |
1527 | be quite correct, I know next to nothing about unicode). This |
|
1533 | be quite correct, I know next to nothing about unicode). This | |
1528 | will allow unicode strings to be used in prompts, amongst other |
|
1534 | will allow unicode strings to be used in prompts, amongst other | |
1529 | cases. It also will prevent ipython from crashing when unicode |
|
1535 | cases. It also will prevent ipython from crashing when unicode | |
1530 | shows up unexpectedly in many places. If ascii encoding fails, we |
|
1536 | shows up unexpectedly in many places. If ascii encoding fails, we | |
1531 | assume utf_8. Currently the encoding is not a user-visible |
|
1537 | assume utf_8. Currently the encoding is not a user-visible | |
1532 | setting, though it could be made so if there is demand for it. |
|
1538 | setting, though it could be made so if there is demand for it. | |
1533 |
|
1539 | |||
1534 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. |
|
1540 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. | |
1535 |
|
1541 | |||
1536 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. |
|
1542 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. | |
1537 |
|
1543 | |||
1538 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. |
|
1544 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. | |
1539 |
|
1545 | |||
1540 | * IPython/genutils.py: Add 2.2 compatibility here, so all other |
|
1546 | * IPython/genutils.py: Add 2.2 compatibility here, so all other | |
1541 | code can work transparently for 2.2/2.3. |
|
1547 | code can work transparently for 2.2/2.3. | |
1542 |
|
1548 | |||
1543 | 2005-07-16 Fernando Perez <fperez@colorado.edu> |
|
1549 | 2005-07-16 Fernando Perez <fperez@colorado.edu> | |
1544 |
|
1550 | |||
1545 | * IPython/ultraTB.py (ExceptionColors): Make a global variable |
|
1551 | * IPython/ultraTB.py (ExceptionColors): Make a global variable | |
1546 | out of the color scheme table used for coloring exception |
|
1552 | out of the color scheme table used for coloring exception | |
1547 | tracebacks. This allows user code to add new schemes at runtime. |
|
1553 | tracebacks. This allows user code to add new schemes at runtime. | |
1548 | This is a minimally modified version of the patch at |
|
1554 | This is a minimally modified version of the patch at | |
1549 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw |
|
1555 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw | |
1550 | for the contribution. |
|
1556 | for the contribution. | |
1551 |
|
1557 | |||
1552 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a |
|
1558 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a | |
1553 | slightly modified version of the patch in |
|
1559 | slightly modified version of the patch in | |
1554 | http://www.scipy.net/roundup/ipython/issue34, which also allows me |
|
1560 | http://www.scipy.net/roundup/ipython/issue34, which also allows me | |
1555 | to remove the previous try/except solution (which was costlier). |
|
1561 | to remove the previous try/except solution (which was costlier). | |
1556 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. |
|
1562 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. | |
1557 |
|
1563 | |||
1558 | 2005-06-08 Fernando Perez <fperez@colorado.edu> |
|
1564 | 2005-06-08 Fernando Perez <fperez@colorado.edu> | |
1559 |
|
1565 | |||
1560 | * IPython/iplib.py (write/write_err): Add methods to abstract all |
|
1566 | * IPython/iplib.py (write/write_err): Add methods to abstract all | |
1561 | I/O a bit more. |
|
1567 | I/O a bit more. | |
1562 |
|
1568 | |||
1563 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation |
|
1569 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation | |
1564 | warning, reported by Aric Hagberg, fix by JD Hunter. |
|
1570 | warning, reported by Aric Hagberg, fix by JD Hunter. | |
1565 |
|
1571 | |||
1566 | 2005-06-02 *** Released version 0.6.15 |
|
1572 | 2005-06-02 *** Released version 0.6.15 | |
1567 |
|
1573 | |||
1568 | 2005-06-01 Fernando Perez <fperez@colorado.edu> |
|
1574 | 2005-06-01 Fernando Perez <fperez@colorado.edu> | |
1569 |
|
1575 | |||
1570 | * IPython/iplib.py (MagicCompleter.file_matches): Fix |
|
1576 | * IPython/iplib.py (MagicCompleter.file_matches): Fix | |
1571 | tab-completion of filenames within open-quoted strings. Note that |
|
1577 | tab-completion of filenames within open-quoted strings. Note that | |
1572 | this requires that in ~/.ipython/ipythonrc, users change the |
|
1578 | this requires that in ~/.ipython/ipythonrc, users change the | |
1573 | readline delimiters configuration to read: |
|
1579 | readline delimiters configuration to read: | |
1574 |
|
1580 | |||
1575 | readline_remove_delims -/~ |
|
1581 | readline_remove_delims -/~ | |
1576 |
|
1582 | |||
1577 |
|
1583 | |||
1578 | 2005-05-31 *** Released version 0.6.14 |
|
1584 | 2005-05-31 *** Released version 0.6.14 | |
1579 |
|
1585 | |||
1580 | 2005-05-29 Fernando Perez <fperez@colorado.edu> |
|
1586 | 2005-05-29 Fernando Perez <fperez@colorado.edu> | |
1581 |
|
1587 | |||
1582 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks |
|
1588 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks | |
1583 | with files not on the filesystem. Reported by Eliyahu Sandler |
|
1589 | with files not on the filesystem. Reported by Eliyahu Sandler | |
1584 | <eli@gondolin.net> |
|
1590 | <eli@gondolin.net> | |
1585 |
|
1591 | |||
1586 | 2005-05-22 Fernando Perez <fperez@colorado.edu> |
|
1592 | 2005-05-22 Fernando Perez <fperez@colorado.edu> | |
1587 |
|
1593 | |||
1588 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. |
|
1594 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. | |
1589 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. |
|
1595 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. | |
1590 |
|
1596 | |||
1591 | 2005-05-19 Fernando Perez <fperez@colorado.edu> |
|
1597 | 2005-05-19 Fernando Perez <fperez@colorado.edu> | |
1592 |
|
1598 | |||
1593 | * IPython/iplib.py (safe_execfile): close a file which could be |
|
1599 | * IPython/iplib.py (safe_execfile): close a file which could be | |
1594 | left open (causing problems in win32, which locks open files). |
|
1600 | left open (causing problems in win32, which locks open files). | |
1595 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. |
|
1601 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. | |
1596 |
|
1602 | |||
1597 | 2005-05-18 Fernando Perez <fperez@colorado.edu> |
|
1603 | 2005-05-18 Fernando Perez <fperez@colorado.edu> | |
1598 |
|
1604 | |||
1599 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all |
|
1605 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all | |
1600 | keyword arguments correctly to safe_execfile(). |
|
1606 | keyword arguments correctly to safe_execfile(). | |
1601 |
|
1607 | |||
1602 | 2005-05-13 Fernando Perez <fperez@colorado.edu> |
|
1608 | 2005-05-13 Fernando Perez <fperez@colorado.edu> | |
1603 |
|
1609 | |||
1604 | * ipython.1: Added info about Qt to manpage, and threads warning |
|
1610 | * ipython.1: Added info about Qt to manpage, and threads warning | |
1605 | to usage page (invoked with --help). |
|
1611 | to usage page (invoked with --help). | |
1606 |
|
1612 | |||
1607 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added |
|
1613 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added | |
1608 | new matcher (it goes at the end of the priority list) to do |
|
1614 | new matcher (it goes at the end of the priority list) to do | |
1609 | tab-completion on named function arguments. Submitted by George |
|
1615 | tab-completion on named function arguments. Submitted by George | |
1610 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at |
|
1616 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at | |
1611 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html |
|
1617 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html | |
1612 | for more details. |
|
1618 | for more details. | |
1613 |
|
1619 | |||
1614 | * IPython/Magic.py (magic_run): Added new -e flag to ignore |
|
1620 | * IPython/Magic.py (magic_run): Added new -e flag to ignore | |
1615 | SystemExit exceptions in the script being run. Thanks to a report |
|
1621 | SystemExit exceptions in the script being run. Thanks to a report | |
1616 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this |
|
1622 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this | |
1617 | producing very annoying behavior when running unit tests. |
|
1623 | producing very annoying behavior when running unit tests. | |
1618 |
|
1624 | |||
1619 | 2005-05-12 Fernando Perez <fperez@colorado.edu> |
|
1625 | 2005-05-12 Fernando Perez <fperez@colorado.edu> | |
1620 |
|
1626 | |||
1621 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, |
|
1627 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, | |
1622 | which I'd broken (again) due to a changed regexp. In the process, |
|
1628 | which I'd broken (again) due to a changed regexp. In the process, | |
1623 | added ';' as an escape to auto-quote the whole line without |
|
1629 | added ';' as an escape to auto-quote the whole line without | |
1624 | splitting its arguments. Thanks to a report by Jerry McRae |
|
1630 | splitting its arguments. Thanks to a report by Jerry McRae | |
1625 | <qrs0xyc02-AT-sneakemail.com>. |
|
1631 | <qrs0xyc02-AT-sneakemail.com>. | |
1626 |
|
1632 | |||
1627 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but |
|
1633 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but | |
1628 | possible crashes caused by a TokenError. Reported by Ed Schofield |
|
1634 | possible crashes caused by a TokenError. Reported by Ed Schofield | |
1629 | <schofield-AT-ftw.at>. |
|
1635 | <schofield-AT-ftw.at>. | |
1630 |
|
1636 | |||
1631 | 2005-05-06 Fernando Perez <fperez@colorado.edu> |
|
1637 | 2005-05-06 Fernando Perez <fperez@colorado.edu> | |
1632 |
|
1638 | |||
1633 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. |
|
1639 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. | |
1634 |
|
1640 | |||
1635 | 2005-04-29 Fernando Perez <fperez@colorado.edu> |
|
1641 | 2005-04-29 Fernando Perez <fperez@colorado.edu> | |
1636 |
|
1642 | |||
1637 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière |
|
1643 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière | |
1638 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin |
|
1644 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin | |
1639 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option |
|
1645 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option | |
1640 | which provides support for Qt interactive usage (similar to the |
|
1646 | which provides support for Qt interactive usage (similar to the | |
1641 | existing one for WX and GTK). This had been often requested. |
|
1647 | existing one for WX and GTK). This had been often requested. | |
1642 |
|
1648 | |||
1643 | 2005-04-14 *** Released version 0.6.13 |
|
1649 | 2005-04-14 *** Released version 0.6.13 | |
1644 |
|
1650 | |||
1645 | 2005-04-08 Fernando Perez <fperez@colorado.edu> |
|
1651 | 2005-04-08 Fernando Perez <fperez@colorado.edu> | |
1646 |
|
1652 | |||
1647 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation |
|
1653 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation | |
1648 | from _ofind, which gets called on almost every input line. Now, |
|
1654 | from _ofind, which gets called on almost every input line. Now, | |
1649 | we only try to get docstrings if they are actually going to be |
|
1655 | we only try to get docstrings if they are actually going to be | |
1650 | used (the overhead of fetching unnecessary docstrings can be |
|
1656 | used (the overhead of fetching unnecessary docstrings can be | |
1651 | noticeable for certain objects, such as Pyro proxies). |
|
1657 | noticeable for certain objects, such as Pyro proxies). | |
1652 |
|
1658 | |||
1653 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API |
|
1659 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API | |
1654 | for completers. For some reason I had been passing them the state |
|
1660 | for completers. For some reason I had been passing them the state | |
1655 | variable, which completers never actually need, and was in |
|
1661 | variable, which completers never actually need, and was in | |
1656 | conflict with the rlcompleter API. Custom completers ONLY need to |
|
1662 | conflict with the rlcompleter API. Custom completers ONLY need to | |
1657 | take the text parameter. |
|
1663 | take the text parameter. | |
1658 |
|
1664 | |||
1659 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics |
|
1665 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics | |
1660 | work correctly in pysh. I've also moved all the logic which used |
|
1666 | work correctly in pysh. I've also moved all the logic which used | |
1661 | to be in pysh.py here, which will prevent problems with future |
|
1667 | to be in pysh.py here, which will prevent problems with future | |
1662 | upgrades. However, this time I must warn users to update their |
|
1668 | upgrades. However, this time I must warn users to update their | |
1663 | pysh profile to include the line |
|
1669 | pysh profile to include the line | |
1664 |
|
1670 | |||
1665 | import_all IPython.Extensions.InterpreterExec |
|
1671 | import_all IPython.Extensions.InterpreterExec | |
1666 |
|
1672 | |||
1667 | because otherwise things won't work for them. They MUST also |
|
1673 | because otherwise things won't work for them. They MUST also | |
1668 | delete pysh.py and the line |
|
1674 | delete pysh.py and the line | |
1669 |
|
1675 | |||
1670 | execfile pysh.py |
|
1676 | execfile pysh.py | |
1671 |
|
1677 | |||
1672 | from their ipythonrc-pysh. |
|
1678 | from their ipythonrc-pysh. | |
1673 |
|
1679 | |||
1674 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more |
|
1680 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more | |
1675 | robust in the face of objects whose dir() returns non-strings |
|
1681 | robust in the face of objects whose dir() returns non-strings | |
1676 | (which it shouldn't, but some broken libs like ITK do). Thanks to |
|
1682 | (which it shouldn't, but some broken libs like ITK do). Thanks to | |
1677 | a patch by John Hunter (implemented differently, though). Also |
|
1683 | a patch by John Hunter (implemented differently, though). Also | |
1678 | minor improvements by using .extend instead of + on lists. |
|
1684 | minor improvements by using .extend instead of + on lists. | |
1679 |
|
1685 | |||
1680 | * pysh.py: |
|
1686 | * pysh.py: | |
1681 |
|
1687 | |||
1682 | 2005-04-06 Fernando Perez <fperez@colorado.edu> |
|
1688 | 2005-04-06 Fernando Perez <fperez@colorado.edu> | |
1683 |
|
1689 | |||
1684 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on |
|
1690 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on | |
1685 | by default, so that all users benefit from it. Those who don't |
|
1691 | by default, so that all users benefit from it. Those who don't | |
1686 | want it can still turn it off. |
|
1692 | want it can still turn it off. | |
1687 |
|
1693 | |||
1688 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the |
|
1694 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the | |
1689 | config file, I'd forgotten about this, so users were getting it |
|
1695 | config file, I'd forgotten about this, so users were getting it | |
1690 | off by default. |
|
1696 | off by default. | |
1691 |
|
1697 | |||
1692 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for |
|
1698 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for | |
1693 | consistency. Now magics can be called in multiline statements, |
|
1699 | consistency. Now magics can be called in multiline statements, | |
1694 | and python variables can be expanded in magic calls via $var. |
|
1700 | and python variables can be expanded in magic calls via $var. | |
1695 | This makes the magic system behave just like aliases or !system |
|
1701 | This makes the magic system behave just like aliases or !system | |
1696 | calls. |
|
1702 | calls. | |
1697 |
|
1703 | |||
1698 | 2005-03-28 Fernando Perez <fperez@colorado.edu> |
|
1704 | 2005-03-28 Fernando Perez <fperez@colorado.edu> | |
1699 |
|
1705 | |||
1700 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of |
|
1706 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of | |
1701 | expensive string additions for building command. Add support for |
|
1707 | expensive string additions for building command. Add support for | |
1702 | trailing ';' when autocall is used. |
|
1708 | trailing ';' when autocall is used. | |
1703 |
|
1709 | |||
1704 | 2005-03-26 Fernando Perez <fperez@colorado.edu> |
|
1710 | 2005-03-26 Fernando Perez <fperez@colorado.edu> | |
1705 |
|
1711 | |||
1706 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. |
|
1712 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. | |
1707 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make |
|
1713 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make | |
1708 | ipython.el robust against prompts with any number of spaces |
|
1714 | ipython.el robust against prompts with any number of spaces | |
1709 | (including 0) after the ':' character. |
|
1715 | (including 0) after the ':' character. | |
1710 |
|
1716 | |||
1711 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in |
|
1717 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in | |
1712 | continuation prompt, which misled users to think the line was |
|
1718 | continuation prompt, which misled users to think the line was | |
1713 | already indented. Closes debian Bug#300847, reported to me by |
|
1719 | already indented. Closes debian Bug#300847, reported to me by | |
1714 | Norbert Tretkowski <tretkowski-AT-inittab.de>. |
|
1720 | Norbert Tretkowski <tretkowski-AT-inittab.de>. | |
1715 |
|
1721 | |||
1716 | 2005-03-23 Fernando Perez <fperez@colorado.edu> |
|
1722 | 2005-03-23 Fernando Perez <fperez@colorado.edu> | |
1717 |
|
1723 | |||
1718 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are |
|
1724 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are | |
1719 | properly aligned if they have embedded newlines. |
|
1725 | properly aligned if they have embedded newlines. | |
1720 |
|
1726 | |||
1721 | * IPython/iplib.py (runlines): Add a public method to expose |
|
1727 | * IPython/iplib.py (runlines): Add a public method to expose | |
1722 | IPython's code execution machinery, so that users can run strings |
|
1728 | IPython's code execution machinery, so that users can run strings | |
1723 | as if they had been typed at the prompt interactively. |
|
1729 | as if they had been typed at the prompt interactively. | |
1724 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ |
|
1730 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ | |
1725 | methods which can call the system shell, but with python variable |
|
1731 | methods which can call the system shell, but with python variable | |
1726 | expansion. The three such methods are: __IPYTHON__.system, |
|
1732 | expansion. The three such methods are: __IPYTHON__.system, | |
1727 | .getoutput and .getoutputerror. These need to be documented in a |
|
1733 | .getoutput and .getoutputerror. These need to be documented in a | |
1728 | 'public API' section (to be written) of the manual. |
|
1734 | 'public API' section (to be written) of the manual. | |
1729 |
|
1735 | |||
1730 | 2005-03-20 Fernando Perez <fperez@colorado.edu> |
|
1736 | 2005-03-20 Fernando Perez <fperez@colorado.edu> | |
1731 |
|
1737 | |||
1732 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system |
|
1738 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system | |
1733 | for custom exception handling. This is quite powerful, and it |
|
1739 | for custom exception handling. This is quite powerful, and it | |
1734 | allows for user-installable exception handlers which can trap |
|
1740 | allows for user-installable exception handlers which can trap | |
1735 | custom exceptions at runtime and treat them separately from |
|
1741 | custom exceptions at runtime and treat them separately from | |
1736 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric |
|
1742 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric | |
1737 | Mantegazza <mantegazza-AT-ill.fr>. |
|
1743 | Mantegazza <mantegazza-AT-ill.fr>. | |
1738 | (InteractiveShell.set_custom_completer): public API function to |
|
1744 | (InteractiveShell.set_custom_completer): public API function to | |
1739 | add new completers at runtime. |
|
1745 | add new completers at runtime. | |
1740 |
|
1746 | |||
1741 | 2005-03-19 Fernando Perez <fperez@colorado.edu> |
|
1747 | 2005-03-19 Fernando Perez <fperez@colorado.edu> | |
1742 |
|
1748 | |||
1743 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to |
|
1749 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to | |
1744 | allow objects which provide their docstrings via non-standard |
|
1750 | allow objects which provide their docstrings via non-standard | |
1745 | mechanisms (like Pyro proxies) to still be inspected by ipython's |
|
1751 | mechanisms (like Pyro proxies) to still be inspected by ipython's | |
1746 | ? system. |
|
1752 | ? system. | |
1747 |
|
1753 | |||
1748 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e |
|
1754 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e | |
1749 | automatic capture system. I tried quite hard to make it work |
|
1755 | automatic capture system. I tried quite hard to make it work | |
1750 | reliably, and simply failed. I tried many combinations with the |
|
1756 | reliably, and simply failed. I tried many combinations with the | |
1751 | subprocess module, but eventually nothing worked in all needed |
|
1757 | subprocess module, but eventually nothing worked in all needed | |
1752 | cases (not blocking stdin for the child, duplicating stdout |
|
1758 | cases (not blocking stdin for the child, duplicating stdout | |
1753 | without blocking, etc). The new %sc/%sx still do capture to these |
|
1759 | without blocking, etc). The new %sc/%sx still do capture to these | |
1754 | magical list/string objects which make shell use much more |
|
1760 | magical list/string objects which make shell use much more | |
1755 | conveninent, so not all is lost. |
|
1761 | conveninent, so not all is lost. | |
1756 |
|
1762 | |||
1757 | XXX - FIX MANUAL for the change above! |
|
1763 | XXX - FIX MANUAL for the change above! | |
1758 |
|
1764 | |||
1759 | (runsource): I copied code.py's runsource() into ipython to modify |
|
1765 | (runsource): I copied code.py's runsource() into ipython to modify | |
1760 | it a bit. Now the code object and source to be executed are |
|
1766 | it a bit. Now the code object and source to be executed are | |
1761 | stored in ipython. This makes this info accessible to third-party |
|
1767 | stored in ipython. This makes this info accessible to third-party | |
1762 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric |
|
1768 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric | |
1763 | Mantegazza <mantegazza-AT-ill.fr>. |
|
1769 | Mantegazza <mantegazza-AT-ill.fr>. | |
1764 |
|
1770 | |||
1765 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to |
|
1771 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to | |
1766 | history-search via readline (like C-p/C-n). I'd wanted this for a |
|
1772 | history-search via readline (like C-p/C-n). I'd wanted this for a | |
1767 | long time, but only recently found out how to do it. For users |
|
1773 | long time, but only recently found out how to do it. For users | |
1768 | who already have their ipythonrc files made and want this, just |
|
1774 | who already have their ipythonrc files made and want this, just | |
1769 | add: |
|
1775 | add: | |
1770 |
|
1776 | |||
1771 | readline_parse_and_bind "\e[A": history-search-backward |
|
1777 | readline_parse_and_bind "\e[A": history-search-backward | |
1772 | readline_parse_and_bind "\e[B": history-search-forward |
|
1778 | readline_parse_and_bind "\e[B": history-search-forward | |
1773 |
|
1779 | |||
1774 | 2005-03-18 Fernando Perez <fperez@colorado.edu> |
|
1780 | 2005-03-18 Fernando Perez <fperez@colorado.edu> | |
1775 |
|
1781 | |||
1776 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy |
|
1782 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy | |
1777 | LSString and SList classes which allow transparent conversions |
|
1783 | LSString and SList classes which allow transparent conversions | |
1778 | between list mode and whitespace-separated string. |
|
1784 | between list mode and whitespace-separated string. | |
1779 | (magic_r): Fix recursion problem in %r. |
|
1785 | (magic_r): Fix recursion problem in %r. | |
1780 |
|
1786 | |||
1781 | * IPython/genutils.py (LSString): New class to be used for |
|
1787 | * IPython/genutils.py (LSString): New class to be used for | |
1782 | automatic storage of the results of all alias/system calls in _o |
|
1788 | automatic storage of the results of all alias/system calls in _o | |
1783 | and _e (stdout/err). These provide a .l/.list attribute which |
|
1789 | and _e (stdout/err). These provide a .l/.list attribute which | |
1784 | does automatic splitting on newlines. This means that for most |
|
1790 | does automatic splitting on newlines. This means that for most | |
1785 | uses, you'll never need to do capturing of output with %sc/%sx |
|
1791 | uses, you'll never need to do capturing of output with %sc/%sx | |
1786 | anymore, since ipython keeps this always done for you. Note that |
|
1792 | anymore, since ipython keeps this always done for you. Note that | |
1787 | only the LAST results are stored, the _o/e variables are |
|
1793 | only the LAST results are stored, the _o/e variables are | |
1788 | overwritten on each call. If you need to save their contents |
|
1794 | overwritten on each call. If you need to save their contents | |
1789 | further, simply bind them to any other name. |
|
1795 | further, simply bind them to any other name. | |
1790 |
|
1796 | |||
1791 | 2005-03-17 Fernando Perez <fperez@colorado.edu> |
|
1797 | 2005-03-17 Fernando Perez <fperez@colorado.edu> | |
1792 |
|
1798 | |||
1793 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for |
|
1799 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for | |
1794 | prompt namespace handling. |
|
1800 | prompt namespace handling. | |
1795 |
|
1801 | |||
1796 | 2005-03-16 Fernando Perez <fperez@colorado.edu> |
|
1802 | 2005-03-16 Fernando Perez <fperez@colorado.edu> | |
1797 |
|
1803 | |||
1798 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and |
|
1804 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and | |
1799 | classic prompts to be '>>> ' (final space was missing, and it |
|
1805 | classic prompts to be '>>> ' (final space was missing, and it | |
1800 | trips the emacs python mode). |
|
1806 | trips the emacs python mode). | |
1801 | (BasePrompt.__str__): Added safe support for dynamic prompt |
|
1807 | (BasePrompt.__str__): Added safe support for dynamic prompt | |
1802 | strings. Now you can set your prompt string to be '$x', and the |
|
1808 | strings. Now you can set your prompt string to be '$x', and the | |
1803 | value of x will be printed from your interactive namespace. The |
|
1809 | value of x will be printed from your interactive namespace. The | |
1804 | interpolation syntax includes the full Itpl support, so |
|
1810 | interpolation syntax includes the full Itpl support, so | |
1805 | ${foo()+x+bar()} is a valid prompt string now, and the function |
|
1811 | ${foo()+x+bar()} is a valid prompt string now, and the function | |
1806 | calls will be made at runtime. |
|
1812 | calls will be made at runtime. | |
1807 |
|
1813 | |||
1808 | 2005-03-15 Fernando Perez <fperez@colorado.edu> |
|
1814 | 2005-03-15 Fernando Perez <fperez@colorado.edu> | |
1809 |
|
1815 | |||
1810 | * IPython/Magic.py (magic_history): renamed %hist to %history, to |
|
1816 | * IPython/Magic.py (magic_history): renamed %hist to %history, to | |
1811 | avoid name clashes in pylab. %hist still works, it just forwards |
|
1817 | avoid name clashes in pylab. %hist still works, it just forwards | |
1812 | the call to %history. |
|
1818 | the call to %history. | |
1813 |
|
1819 | |||
1814 | 2005-03-02 *** Released version 0.6.12 |
|
1820 | 2005-03-02 *** Released version 0.6.12 | |
1815 |
|
1821 | |||
1816 | 2005-03-02 Fernando Perez <fperez@colorado.edu> |
|
1822 | 2005-03-02 Fernando Perez <fperez@colorado.edu> | |
1817 |
|
1823 | |||
1818 | * IPython/iplib.py (handle_magic): log magic calls properly as |
|
1824 | * IPython/iplib.py (handle_magic): log magic calls properly as | |
1819 | ipmagic() function calls. |
|
1825 | ipmagic() function calls. | |
1820 |
|
1826 | |||
1821 | * IPython/Magic.py (magic_time): Improved %time to support |
|
1827 | * IPython/Magic.py (magic_time): Improved %time to support | |
1822 | statements and provide wall-clock as well as CPU time. |
|
1828 | statements and provide wall-clock as well as CPU time. | |
1823 |
|
1829 | |||
1824 | 2005-02-27 Fernando Perez <fperez@colorado.edu> |
|
1830 | 2005-02-27 Fernando Perez <fperez@colorado.edu> | |
1825 |
|
1831 | |||
1826 | * IPython/hooks.py: New hooks module, to expose user-modifiable |
|
1832 | * IPython/hooks.py: New hooks module, to expose user-modifiable | |
1827 | IPython functionality in a clean manner. For now only the editor |
|
1833 | IPython functionality in a clean manner. For now only the editor | |
1828 | hook is actually written, and other thigns which I intend to turn |
|
1834 | hook is actually written, and other thigns which I intend to turn | |
1829 | into proper hooks aren't yet there. The display and prefilter |
|
1835 | into proper hooks aren't yet there. The display and prefilter | |
1830 | stuff, for example, should be hooks. But at least now the |
|
1836 | stuff, for example, should be hooks. But at least now the | |
1831 | framework is in place, and the rest can be moved here with more |
|
1837 | framework is in place, and the rest can be moved here with more | |
1832 | time later. IPython had had a .hooks variable for a long time for |
|
1838 | time later. IPython had had a .hooks variable for a long time for | |
1833 | this purpose, but I'd never actually used it for anything. |
|
1839 | this purpose, but I'd never actually used it for anything. | |
1834 |
|
1840 | |||
1835 | 2005-02-26 Fernando Perez <fperez@colorado.edu> |
|
1841 | 2005-02-26 Fernando Perez <fperez@colorado.edu> | |
1836 |
|
1842 | |||
1837 | * IPython/ipmaker.py (make_IPython): make the default ipython |
|
1843 | * IPython/ipmaker.py (make_IPython): make the default ipython | |
1838 | directory be called _ipython under win32, to follow more the |
|
1844 | directory be called _ipython under win32, to follow more the | |
1839 | naming peculiarities of that platform (where buggy software like |
|
1845 | naming peculiarities of that platform (where buggy software like | |
1840 | Visual Sourcesafe breaks with .named directories). Reported by |
|
1846 | Visual Sourcesafe breaks with .named directories). Reported by | |
1841 | Ville Vainio. |
|
1847 | Ville Vainio. | |
1842 |
|
1848 | |||
1843 | 2005-02-23 Fernando Perez <fperez@colorado.edu> |
|
1849 | 2005-02-23 Fernando Perez <fperez@colorado.edu> | |
1844 |
|
1850 | |||
1845 | * IPython/iplib.py (InteractiveShell.__init__): removed a few |
|
1851 | * IPython/iplib.py (InteractiveShell.__init__): removed a few | |
1846 | auto_aliases for win32 which were causing problems. Users can |
|
1852 | auto_aliases for win32 which were causing problems. Users can | |
1847 | define the ones they personally like. |
|
1853 | define the ones they personally like. | |
1848 |
|
1854 | |||
1849 | 2005-02-21 Fernando Perez <fperez@colorado.edu> |
|
1855 | 2005-02-21 Fernando Perez <fperez@colorado.edu> | |
1850 |
|
1856 | |||
1851 | * IPython/Magic.py (magic_time): new magic to time execution of |
|
1857 | * IPython/Magic.py (magic_time): new magic to time execution of | |
1852 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. |
|
1858 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. | |
1853 |
|
1859 | |||
1854 | 2005-02-19 Fernando Perez <fperez@colorado.edu> |
|
1860 | 2005-02-19 Fernando Perez <fperez@colorado.edu> | |
1855 |
|
1861 | |||
1856 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings |
|
1862 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings | |
1857 | into keys (for prompts, for example). |
|
1863 | into keys (for prompts, for example). | |
1858 |
|
1864 | |||
1859 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty |
|
1865 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty | |
1860 | prompts in case users want them. This introduces a small behavior |
|
1866 | prompts in case users want them. This introduces a small behavior | |
1861 | change: ipython does not automatically add a space to all prompts |
|
1867 | change: ipython does not automatically add a space to all prompts | |
1862 | anymore. To get the old prompts with a space, users should add it |
|
1868 | anymore. To get the old prompts with a space, users should add it | |
1863 | manually to their ipythonrc file, so for example prompt_in1 should |
|
1869 | manually to their ipythonrc file, so for example prompt_in1 should | |
1864 | now read 'In [\#]: ' instead of 'In [\#]:'. |
|
1870 | now read 'In [\#]: ' instead of 'In [\#]:'. | |
1865 | (BasePrompt.__init__): New option prompts_pad_left (only in rc |
|
1871 | (BasePrompt.__init__): New option prompts_pad_left (only in rc | |
1866 | file) to control left-padding of secondary prompts. |
|
1872 | file) to control left-padding of secondary prompts. | |
1867 |
|
1873 | |||
1868 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if |
|
1874 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if | |
1869 | the profiler can't be imported. Fix for Debian, which removed |
|
1875 | the profiler can't be imported. Fix for Debian, which removed | |
1870 | profile.py because of License issues. I applied a slightly |
|
1876 | profile.py because of License issues. I applied a slightly | |
1871 | modified version of the original Debian patch at |
|
1877 | modified version of the original Debian patch at | |
1872 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. |
|
1878 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. | |
1873 |
|
1879 | |||
1874 | 2005-02-17 Fernando Perez <fperez@colorado.edu> |
|
1880 | 2005-02-17 Fernando Perez <fperez@colorado.edu> | |
1875 |
|
1881 | |||
1876 | * IPython/genutils.py (native_line_ends): Fix bug which would |
|
1882 | * IPython/genutils.py (native_line_ends): Fix bug which would | |
1877 | cause improper line-ends under win32 b/c I was not opening files |
|
1883 | cause improper line-ends under win32 b/c I was not opening files | |
1878 | in binary mode. Bug report and fix thanks to Ville. |
|
1884 | in binary mode. Bug report and fix thanks to Ville. | |
1879 |
|
1885 | |||
1880 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when |
|
1886 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when | |
1881 | trying to catch spurious foo[1] autocalls. My fix actually broke |
|
1887 | trying to catch spurious foo[1] autocalls. My fix actually broke | |
1882 | ',/' autoquote/call with explicit escape (bad regexp). |
|
1888 | ',/' autoquote/call with explicit escape (bad regexp). | |
1883 |
|
1889 | |||
1884 | 2005-02-15 *** Released version 0.6.11 |
|
1890 | 2005-02-15 *** Released version 0.6.11 | |
1885 |
|
1891 | |||
1886 | 2005-02-14 Fernando Perez <fperez@colorado.edu> |
|
1892 | 2005-02-14 Fernando Perez <fperez@colorado.edu> | |
1887 |
|
1893 | |||
1888 | * IPython/background_jobs.py: New background job management |
|
1894 | * IPython/background_jobs.py: New background job management | |
1889 | subsystem. This is implemented via a new set of classes, and |
|
1895 | subsystem. This is implemented via a new set of classes, and | |
1890 | IPython now provides a builtin 'jobs' object for background job |
|
1896 | IPython now provides a builtin 'jobs' object for background job | |
1891 | execution. A convenience %bg magic serves as a lightweight |
|
1897 | execution. A convenience %bg magic serves as a lightweight | |
1892 | frontend for starting the more common type of calls. This was |
|
1898 | frontend for starting the more common type of calls. This was | |
1893 | inspired by discussions with B. Granger and the BackgroundCommand |
|
1899 | inspired by discussions with B. Granger and the BackgroundCommand | |
1894 | class described in the book Python Scripting for Computational |
|
1900 | class described in the book Python Scripting for Computational | |
1895 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting |
|
1901 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting | |
1896 | (although ultimately no code from this text was used, as IPython's |
|
1902 | (although ultimately no code from this text was used, as IPython's | |
1897 | system is a separate implementation). |
|
1903 | system is a separate implementation). | |
1898 |
|
1904 | |||
1899 | * IPython/iplib.py (MagicCompleter.python_matches): add new option |
|
1905 | * IPython/iplib.py (MagicCompleter.python_matches): add new option | |
1900 | to control the completion of single/double underscore names |
|
1906 | to control the completion of single/double underscore names | |
1901 | separately. As documented in the example ipytonrc file, the |
|
1907 | separately. As documented in the example ipytonrc file, the | |
1902 | readline_omit__names variable can now be set to 2, to omit even |
|
1908 | readline_omit__names variable can now be set to 2, to omit even | |
1903 | single underscore names. Thanks to a patch by Brian Wong |
|
1909 | single underscore names. Thanks to a patch by Brian Wong | |
1904 | <BrianWong-AT-AirgoNetworks.Com>. |
|
1910 | <BrianWong-AT-AirgoNetworks.Com>. | |
1905 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to |
|
1911 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to | |
1906 | be autocalled as foo([1]) if foo were callable. A problem for |
|
1912 | be autocalled as foo([1]) if foo were callable. A problem for | |
1907 | things which are both callable and implement __getitem__. |
|
1913 | things which are both callable and implement __getitem__. | |
1908 | (init_readline): Fix autoindentation for win32. Thanks to a patch |
|
1914 | (init_readline): Fix autoindentation for win32. Thanks to a patch | |
1909 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. |
|
1915 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. | |
1910 |
|
1916 | |||
1911 | 2005-02-12 Fernando Perez <fperez@colorado.edu> |
|
1917 | 2005-02-12 Fernando Perez <fperez@colorado.edu> | |
1912 |
|
1918 | |||
1913 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps |
|
1919 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps | |
1914 | which I had written long ago to sort out user error messages which |
|
1920 | which I had written long ago to sort out user error messages which | |
1915 | may occur during startup. This seemed like a good idea initially, |
|
1921 | may occur during startup. This seemed like a good idea initially, | |
1916 | but it has proven a disaster in retrospect. I don't want to |
|
1922 | but it has proven a disaster in retrospect. I don't want to | |
1917 | change much code for now, so my fix is to set the internal 'debug' |
|
1923 | change much code for now, so my fix is to set the internal 'debug' | |
1918 | flag to true everywhere, whose only job was precisely to control |
|
1924 | flag to true everywhere, whose only job was precisely to control | |
1919 | this subsystem. This closes issue 28 (as well as avoiding all |
|
1925 | this subsystem. This closes issue 28 (as well as avoiding all | |
1920 | sorts of strange hangups which occur from time to time). |
|
1926 | sorts of strange hangups which occur from time to time). | |
1921 |
|
1927 | |||
1922 | 2005-02-07 Fernando Perez <fperez@colorado.edu> |
|
1928 | 2005-02-07 Fernando Perez <fperez@colorado.edu> | |
1923 |
|
1929 | |||
1924 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the |
|
1930 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the | |
1925 | previous call produced a syntax error. |
|
1931 | previous call produced a syntax error. | |
1926 |
|
1932 | |||
1927 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
1933 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
1928 | classes without constructor. |
|
1934 | classes without constructor. | |
1929 |
|
1935 | |||
1930 | 2005-02-06 Fernando Perez <fperez@colorado.edu> |
|
1936 | 2005-02-06 Fernando Perez <fperez@colorado.edu> | |
1931 |
|
1937 | |||
1932 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of |
|
1938 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of | |
1933 | completions with the results of each matcher, so we return results |
|
1939 | completions with the results of each matcher, so we return results | |
1934 | to the user from all namespaces. This breaks with ipython |
|
1940 | to the user from all namespaces. This breaks with ipython | |
1935 | tradition, but I think it's a nicer behavior. Now you get all |
|
1941 | tradition, but I think it's a nicer behavior. Now you get all | |
1936 | possible completions listed, from all possible namespaces (python, |
|
1942 | possible completions listed, from all possible namespaces (python, | |
1937 | filesystem, magics...) After a request by John Hunter |
|
1943 | filesystem, magics...) After a request by John Hunter | |
1938 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
1944 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
1939 |
|
1945 | |||
1940 | 2005-02-05 Fernando Perez <fperez@colorado.edu> |
|
1946 | 2005-02-05 Fernando Perez <fperez@colorado.edu> | |
1941 |
|
1947 | |||
1942 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if |
|
1948 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if | |
1943 | the call had quote characters in it (the quotes were stripped). |
|
1949 | the call had quote characters in it (the quotes were stripped). | |
1944 |
|
1950 | |||
1945 | 2005-01-31 Fernando Perez <fperez@colorado.edu> |
|
1951 | 2005-01-31 Fernando Perez <fperez@colorado.edu> | |
1946 |
|
1952 | |||
1947 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on |
|
1953 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on | |
1948 | Itpl.itpl() to make the code more robust against psyco |
|
1954 | Itpl.itpl() to make the code more robust against psyco | |
1949 | optimizations. |
|
1955 | optimizations. | |
1950 |
|
1956 | |||
1951 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead |
|
1957 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead | |
1952 | of causing an exception. Quicker, cleaner. |
|
1958 | of causing an exception. Quicker, cleaner. | |
1953 |
|
1959 | |||
1954 | 2005-01-28 Fernando Perez <fperez@colorado.edu> |
|
1960 | 2005-01-28 Fernando Perez <fperez@colorado.edu> | |
1955 |
|
1961 | |||
1956 | * scripts/ipython_win_post_install.py (install): hardcode |
|
1962 | * scripts/ipython_win_post_install.py (install): hardcode | |
1957 | sys.prefix+'python.exe' as the executable path. It turns out that |
|
1963 | sys.prefix+'python.exe' as the executable path. It turns out that | |
1958 | during the post-installation run, sys.executable resolves to the |
|
1964 | during the post-installation run, sys.executable resolves to the | |
1959 | name of the binary installer! I should report this as a distutils |
|
1965 | name of the binary installer! I should report this as a distutils | |
1960 | bug, I think. I updated the .10 release with this tiny fix, to |
|
1966 | bug, I think. I updated the .10 release with this tiny fix, to | |
1961 | avoid annoying the lists further. |
|
1967 | avoid annoying the lists further. | |
1962 |
|
1968 | |||
1963 | 2005-01-27 *** Released version 0.6.10 |
|
1969 | 2005-01-27 *** Released version 0.6.10 | |
1964 |
|
1970 | |||
1965 | 2005-01-27 Fernando Perez <fperez@colorado.edu> |
|
1971 | 2005-01-27 Fernando Perez <fperez@colorado.edu> | |
1966 |
|
1972 | |||
1967 | * IPython/numutils.py (norm): Added 'inf' as optional name for |
|
1973 | * IPython/numutils.py (norm): Added 'inf' as optional name for | |
1968 | L-infinity norm, included references to mathworld.com for vector |
|
1974 | L-infinity norm, included references to mathworld.com for vector | |
1969 | norm definitions. |
|
1975 | norm definitions. | |
1970 | (amin/amax): added amin/amax for array min/max. Similar to what |
|
1976 | (amin/amax): added amin/amax for array min/max. Similar to what | |
1971 | pylab ships with after the recent reorganization of names. |
|
1977 | pylab ships with after the recent reorganization of names. | |
1972 | (spike/spike_odd): removed deprecated spike/spike_odd functions. |
|
1978 | (spike/spike_odd): removed deprecated spike/spike_odd functions. | |
1973 |
|
1979 | |||
1974 | * ipython.el: committed Alex's recent fixes and improvements. |
|
1980 | * ipython.el: committed Alex's recent fixes and improvements. | |
1975 | Tested with python-mode from CVS, and it looks excellent. Since |
|
1981 | Tested with python-mode from CVS, and it looks excellent. Since | |
1976 | python-mode hasn't released anything in a while, I'm temporarily |
|
1982 | python-mode hasn't released anything in a while, I'm temporarily | |
1977 | putting a copy of today's CVS (v 4.70) of python-mode in: |
|
1983 | putting a copy of today's CVS (v 4.70) of python-mode in: | |
1978 | http://ipython.scipy.org/tmp/python-mode.el |
|
1984 | http://ipython.scipy.org/tmp/python-mode.el | |
1979 |
|
1985 | |||
1980 | * scripts/ipython_win_post_install.py (install): Win32 fix to use |
|
1986 | * scripts/ipython_win_post_install.py (install): Win32 fix to use | |
1981 | sys.executable for the executable name, instead of assuming it's |
|
1987 | sys.executable for the executable name, instead of assuming it's | |
1982 | called 'python.exe' (the post-installer would have produced broken |
|
1988 | called 'python.exe' (the post-installer would have produced broken | |
1983 | setups on systems with a differently named python binary). |
|
1989 | setups on systems with a differently named python binary). | |
1984 |
|
1990 | |||
1985 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' |
|
1991 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' | |
1986 | references to os.linesep, to make the code more |
|
1992 | references to os.linesep, to make the code more | |
1987 | platform-independent. This is also part of the win32 coloring |
|
1993 | platform-independent. This is also part of the win32 coloring | |
1988 | fixes. |
|
1994 | fixes. | |
1989 |
|
1995 | |||
1990 | * IPython/genutils.py (page_dumb): Remove attempts to chop long |
|
1996 | * IPython/genutils.py (page_dumb): Remove attempts to chop long | |
1991 | lines, which actually cause coloring bugs because the length of |
|
1997 | lines, which actually cause coloring bugs because the length of | |
1992 | the line is very difficult to correctly compute with embedded |
|
1998 | the line is very difficult to correctly compute with embedded | |
1993 | escapes. This was the source of all the coloring problems under |
|
1999 | escapes. This was the source of all the coloring problems under | |
1994 | Win32. I think that _finally_, Win32 users have a properly |
|
2000 | Win32. I think that _finally_, Win32 users have a properly | |
1995 | working ipython in all respects. This would never have happened |
|
2001 | working ipython in all respects. This would never have happened | |
1996 | if not for Gary Bishop and Viktor Ransmayr's great help and work. |
|
2002 | if not for Gary Bishop and Viktor Ransmayr's great help and work. | |
1997 |
|
2003 | |||
1998 | 2005-01-26 *** Released version 0.6.9 |
|
2004 | 2005-01-26 *** Released version 0.6.9 | |
1999 |
|
2005 | |||
2000 | 2005-01-25 Fernando Perez <fperez@colorado.edu> |
|
2006 | 2005-01-25 Fernando Perez <fperez@colorado.edu> | |
2001 |
|
2007 | |||
2002 | * setup.py: finally, we have a true Windows installer, thanks to |
|
2008 | * setup.py: finally, we have a true Windows installer, thanks to | |
2003 | the excellent work of Viktor Ransmayr |
|
2009 | the excellent work of Viktor Ransmayr | |
2004 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for |
|
2010 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for | |
2005 | Windows users. The setup routine is quite a bit cleaner thanks to |
|
2011 | Windows users. The setup routine is quite a bit cleaner thanks to | |
2006 | this, and the post-install script uses the proper functions to |
|
2012 | this, and the post-install script uses the proper functions to | |
2007 | allow a clean de-installation using the standard Windows Control |
|
2013 | allow a clean de-installation using the standard Windows Control | |
2008 | Panel. |
|
2014 | Panel. | |
2009 |
|
2015 | |||
2010 | * IPython/genutils.py (get_home_dir): changed to use the $HOME |
|
2016 | * IPython/genutils.py (get_home_dir): changed to use the $HOME | |
2011 | environment variable under all OSes (including win32) if |
|
2017 | environment variable under all OSes (including win32) if | |
2012 | available. This will give consistency to win32 users who have set |
|
2018 | available. This will give consistency to win32 users who have set | |
2013 | this variable for any reason. If os.environ['HOME'] fails, the |
|
2019 | this variable for any reason. If os.environ['HOME'] fails, the | |
2014 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. |
|
2020 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. | |
2015 |
|
2021 | |||
2016 | 2005-01-24 Fernando Perez <fperez@colorado.edu> |
|
2022 | 2005-01-24 Fernando Perez <fperez@colorado.edu> | |
2017 |
|
2023 | |||
2018 | * IPython/numutils.py (empty_like): add empty_like(), similar to |
|
2024 | * IPython/numutils.py (empty_like): add empty_like(), similar to | |
2019 | zeros_like() but taking advantage of the new empty() Numeric routine. |
|
2025 | zeros_like() but taking advantage of the new empty() Numeric routine. | |
2020 |
|
2026 | |||
2021 | 2005-01-23 *** Released version 0.6.8 |
|
2027 | 2005-01-23 *** Released version 0.6.8 | |
2022 |
|
2028 | |||
2023 | 2005-01-22 Fernando Perez <fperez@colorado.edu> |
|
2029 | 2005-01-22 Fernando Perez <fperez@colorado.edu> | |
2024 |
|
2030 | |||
2025 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the |
|
2031 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the | |
2026 | automatic show() calls. After discussing things with JDH, it |
|
2032 | automatic show() calls. After discussing things with JDH, it | |
2027 | turns out there are too many corner cases where this can go wrong. |
|
2033 | turns out there are too many corner cases where this can go wrong. | |
2028 | It's best not to try to be 'too smart', and simply have ipython |
|
2034 | It's best not to try to be 'too smart', and simply have ipython | |
2029 | reproduce as much as possible the default behavior of a normal |
|
2035 | reproduce as much as possible the default behavior of a normal | |
2030 | python shell. |
|
2036 | python shell. | |
2031 |
|
2037 | |||
2032 | * IPython/iplib.py (InteractiveShell.__init__): Modified the |
|
2038 | * IPython/iplib.py (InteractiveShell.__init__): Modified the | |
2033 | line-splitting regexp and _prefilter() to avoid calling getattr() |
|
2039 | line-splitting regexp and _prefilter() to avoid calling getattr() | |
2034 | on assignments. This closes |
|
2040 | on assignments. This closes | |
2035 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's |
|
2041 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's | |
2036 | readline uses getattr(), so a simple <TAB> keypress is still |
|
2042 | readline uses getattr(), so a simple <TAB> keypress is still | |
2037 | enough to trigger getattr() calls on an object. |
|
2043 | enough to trigger getattr() calls on an object. | |
2038 |
|
2044 | |||
2039 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
2045 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
2040 |
|
2046 | |||
2041 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run |
|
2047 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run | |
2042 | docstring under pylab so it doesn't mask the original. |
|
2048 | docstring under pylab so it doesn't mask the original. | |
2043 |
|
2049 | |||
2044 | 2005-01-21 *** Released version 0.6.7 |
|
2050 | 2005-01-21 *** Released version 0.6.7 | |
2045 |
|
2051 | |||
2046 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
2052 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
2047 |
|
2053 | |||
2048 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with |
|
2054 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with | |
2049 | signal handling for win32 users in multithreaded mode. |
|
2055 | signal handling for win32 users in multithreaded mode. | |
2050 |
|
2056 | |||
2051 | 2005-01-17 Fernando Perez <fperez@colorado.edu> |
|
2057 | 2005-01-17 Fernando Perez <fperez@colorado.edu> | |
2052 |
|
2058 | |||
2053 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
2059 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
2054 | instances with no __init__. After a crash report by Norbert Nemec |
|
2060 | instances with no __init__. After a crash report by Norbert Nemec | |
2055 | <Norbert-AT-nemec-online.de>. |
|
2061 | <Norbert-AT-nemec-online.de>. | |
2056 |
|
2062 | |||
2057 | 2005-01-14 Fernando Perez <fperez@colorado.edu> |
|
2063 | 2005-01-14 Fernando Perez <fperez@colorado.edu> | |
2058 |
|
2064 | |||
2059 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of |
|
2065 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of | |
2060 | names for verbose exceptions, when multiple dotted names and the |
|
2066 | names for verbose exceptions, when multiple dotted names and the | |
2061 | 'parent' object were present on the same line. |
|
2067 | 'parent' object were present on the same line. | |
2062 |
|
2068 | |||
2063 | 2005-01-11 Fernando Perez <fperez@colorado.edu> |
|
2069 | 2005-01-11 Fernando Perez <fperez@colorado.edu> | |
2064 |
|
2070 | |||
2065 | * IPython/genutils.py (flag_calls): new utility to trap and flag |
|
2071 | * IPython/genutils.py (flag_calls): new utility to trap and flag | |
2066 | calls in functions. I need it to clean up matplotlib support. |
|
2072 | calls in functions. I need it to clean up matplotlib support. | |
2067 | Also removed some deprecated code in genutils. |
|
2073 | Also removed some deprecated code in genutils. | |
2068 |
|
2074 | |||
2069 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so |
|
2075 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so | |
2070 | that matplotlib scripts called with %run, which don't call show() |
|
2076 | that matplotlib scripts called with %run, which don't call show() | |
2071 | themselves, still have their plotting windows open. |
|
2077 | themselves, still have their plotting windows open. | |
2072 |
|
2078 | |||
2073 | 2005-01-05 Fernando Perez <fperez@colorado.edu> |
|
2079 | 2005-01-05 Fernando Perez <fperez@colorado.edu> | |
2074 |
|
2080 | |||
2075 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw |
|
2081 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw | |
2076 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. |
|
2082 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. | |
2077 |
|
2083 | |||
2078 | 2004-12-19 Fernando Perez <fperez@colorado.edu> |
|
2084 | 2004-12-19 Fernando Perez <fperez@colorado.edu> | |
2079 |
|
2085 | |||
2080 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of |
|
2086 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of | |
2081 | parent_runcode, which was an eyesore. The same result can be |
|
2087 | parent_runcode, which was an eyesore. The same result can be | |
2082 | obtained with Python's regular superclass mechanisms. |
|
2088 | obtained with Python's regular superclass mechanisms. | |
2083 |
|
2089 | |||
2084 | 2004-12-17 Fernando Perez <fperez@colorado.edu> |
|
2090 | 2004-12-17 Fernando Perez <fperez@colorado.edu> | |
2085 |
|
2091 | |||
2086 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem |
|
2092 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem | |
2087 | reported by Prabhu. |
|
2093 | reported by Prabhu. | |
2088 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to |
|
2094 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to | |
2089 | sys.stderr) instead of explicitly calling sys.stderr. This helps |
|
2095 | sys.stderr) instead of explicitly calling sys.stderr. This helps | |
2090 | maintain our I/O abstractions clean, for future GUI embeddings. |
|
2096 | maintain our I/O abstractions clean, for future GUI embeddings. | |
2091 |
|
2097 | |||
2092 | * IPython/genutils.py (info): added new utility for sys.stderr |
|
2098 | * IPython/genutils.py (info): added new utility for sys.stderr | |
2093 | unified info message handling (thin wrapper around warn()). |
|
2099 | unified info message handling (thin wrapper around warn()). | |
2094 |
|
2100 | |||
2095 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global |
|
2101 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global | |
2096 | composite (dotted) names on verbose exceptions. |
|
2102 | composite (dotted) names on verbose exceptions. | |
2097 | (VerboseTB.nullrepr): harden against another kind of errors which |
|
2103 | (VerboseTB.nullrepr): harden against another kind of errors which | |
2098 | Python's inspect module can trigger, and which were crashing |
|
2104 | Python's inspect module can trigger, and which were crashing | |
2099 | IPython. Thanks to a report by Marco Lombardi |
|
2105 | IPython. Thanks to a report by Marco Lombardi | |
2100 | <mlombard-AT-ma010192.hq.eso.org>. |
|
2106 | <mlombard-AT-ma010192.hq.eso.org>. | |
2101 |
|
2107 | |||
2102 | 2004-12-13 *** Released version 0.6.6 |
|
2108 | 2004-12-13 *** Released version 0.6.6 | |
2103 |
|
2109 | |||
2104 | 2004-12-12 Fernando Perez <fperez@colorado.edu> |
|
2110 | 2004-12-12 Fernando Perez <fperez@colorado.edu> | |
2105 |
|
2111 | |||
2106 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors |
|
2112 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors | |
2107 | generated by pygtk upon initialization if it was built without |
|
2113 | generated by pygtk upon initialization if it was built without | |
2108 | threads (for matplotlib users). After a crash reported by |
|
2114 | threads (for matplotlib users). After a crash reported by | |
2109 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. |
|
2115 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. | |
2110 |
|
2116 | |||
2111 | * IPython/ipmaker.py (make_IPython): fix small bug in the |
|
2117 | * IPython/ipmaker.py (make_IPython): fix small bug in the | |
2112 | import_some parameter for multiple imports. |
|
2118 | import_some parameter for multiple imports. | |
2113 |
|
2119 | |||
2114 | * IPython/iplib.py (ipmagic): simplified the interface of |
|
2120 | * IPython/iplib.py (ipmagic): simplified the interface of | |
2115 | ipmagic() to take a single string argument, just as it would be |
|
2121 | ipmagic() to take a single string argument, just as it would be | |
2116 | typed at the IPython cmd line. |
|
2122 | typed at the IPython cmd line. | |
2117 | (ipalias): Added new ipalias() with an interface identical to |
|
2123 | (ipalias): Added new ipalias() with an interface identical to | |
2118 | ipmagic(). This completes exposing a pure python interface to the |
|
2124 | ipmagic(). This completes exposing a pure python interface to the | |
2119 | alias and magic system, which can be used in loops or more complex |
|
2125 | alias and magic system, which can be used in loops or more complex | |
2120 | code where IPython's automatic line mangling is not active. |
|
2126 | code where IPython's automatic line mangling is not active. | |
2121 |
|
2127 | |||
2122 | * IPython/genutils.py (timing): changed interface of timing to |
|
2128 | * IPython/genutils.py (timing): changed interface of timing to | |
2123 | simply run code once, which is the most common case. timings() |
|
2129 | simply run code once, which is the most common case. timings() | |
2124 | remains unchanged, for the cases where you want multiple runs. |
|
2130 | remains unchanged, for the cases where you want multiple runs. | |
2125 |
|
2131 | |||
2126 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a |
|
2132 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a | |
2127 | bug where Python2.2 crashes with exec'ing code which does not end |
|
2133 | bug where Python2.2 crashes with exec'ing code which does not end | |
2128 | in a single newline. Python 2.3 is OK, so I hadn't noticed this |
|
2134 | in a single newline. Python 2.3 is OK, so I hadn't noticed this | |
2129 | before. |
|
2135 | before. | |
2130 |
|
2136 | |||
2131 | 2004-12-10 Fernando Perez <fperez@colorado.edu> |
|
2137 | 2004-12-10 Fernando Perez <fperez@colorado.edu> | |
2132 |
|
2138 | |||
2133 | * IPython/Magic.py (Magic.magic_prun): changed name of option from |
|
2139 | * IPython/Magic.py (Magic.magic_prun): changed name of option from | |
2134 | -t to -T, to accomodate the new -t flag in %run (the %run and |
|
2140 | -t to -T, to accomodate the new -t flag in %run (the %run and | |
2135 | %prun options are kind of intermixed, and it's not easy to change |
|
2141 | %prun options are kind of intermixed, and it's not easy to change | |
2136 | this with the limitations of python's getopt). |
|
2142 | this with the limitations of python's getopt). | |
2137 |
|
2143 | |||
2138 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time |
|
2144 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time | |
2139 | the execution of scripts. It's not as fine-tuned as timeit.py, |
|
2145 | the execution of scripts. It's not as fine-tuned as timeit.py, | |
2140 | but it works from inside ipython (and under 2.2, which lacks |
|
2146 | but it works from inside ipython (and under 2.2, which lacks | |
2141 | timeit.py). Optionally a number of runs > 1 can be given for |
|
2147 | timeit.py). Optionally a number of runs > 1 can be given for | |
2142 | timing very short-running code. |
|
2148 | timing very short-running code. | |
2143 |
|
2149 | |||
2144 | * IPython/genutils.py (uniq_stable): new routine which returns a |
|
2150 | * IPython/genutils.py (uniq_stable): new routine which returns a | |
2145 | list of unique elements in any iterable, but in stable order of |
|
2151 | list of unique elements in any iterable, but in stable order of | |
2146 | appearance. I needed this for the ultraTB fixes, and it's a handy |
|
2152 | appearance. I needed this for the ultraTB fixes, and it's a handy | |
2147 | utility. |
|
2153 | utility. | |
2148 |
|
2154 | |||
2149 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of |
|
2155 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of | |
2150 | dotted names in Verbose exceptions. This had been broken since |
|
2156 | dotted names in Verbose exceptions. This had been broken since | |
2151 | the very start, now x.y will properly be printed in a Verbose |
|
2157 | the very start, now x.y will properly be printed in a Verbose | |
2152 | traceback, instead of x being shown and y appearing always as an |
|
2158 | traceback, instead of x being shown and y appearing always as an | |
2153 | 'undefined global'. Getting this to work was a bit tricky, |
|
2159 | 'undefined global'. Getting this to work was a bit tricky, | |
2154 | because by default python tokenizers are stateless. Saved by |
|
2160 | because by default python tokenizers are stateless. Saved by | |
2155 | python's ability to easily add a bit of state to an arbitrary |
|
2161 | python's ability to easily add a bit of state to an arbitrary | |
2156 | function (without needing to build a full-blown callable object). |
|
2162 | function (without needing to build a full-blown callable object). | |
2157 |
|
2163 | |||
2158 | Also big cleanup of this code, which had horrendous runtime |
|
2164 | Also big cleanup of this code, which had horrendous runtime | |
2159 | lookups of zillions of attributes for colorization. Moved all |
|
2165 | lookups of zillions of attributes for colorization. Moved all | |
2160 | this code into a few templates, which make it cleaner and quicker. |
|
2166 | this code into a few templates, which make it cleaner and quicker. | |
2161 |
|
2167 | |||
2162 | Printout quality was also improved for Verbose exceptions: one |
|
2168 | Printout quality was also improved for Verbose exceptions: one | |
2163 | variable per line, and memory addresses are printed (this can be |
|
2169 | variable per line, and memory addresses are printed (this can be | |
2164 | quite handy in nasty debugging situations, which is what Verbose |
|
2170 | quite handy in nasty debugging situations, which is what Verbose | |
2165 | is for). |
|
2171 | is for). | |
2166 |
|
2172 | |||
2167 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in |
|
2173 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in | |
2168 | the command line as scripts to be loaded by embedded instances. |
|
2174 | the command line as scripts to be loaded by embedded instances. | |
2169 | Doing so has the potential for an infinite recursion if there are |
|
2175 | Doing so has the potential for an infinite recursion if there are | |
2170 | exceptions thrown in the process. This fixes a strange crash |
|
2176 | exceptions thrown in the process. This fixes a strange crash | |
2171 | reported by Philippe MULLER <muller-AT-irit.fr>. |
|
2177 | reported by Philippe MULLER <muller-AT-irit.fr>. | |
2172 |
|
2178 | |||
2173 | 2004-12-09 Fernando Perez <fperez@colorado.edu> |
|
2179 | 2004-12-09 Fernando Perez <fperez@colorado.edu> | |
2174 |
|
2180 | |||
2175 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support |
|
2181 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support | |
2176 | to reflect new names in matplotlib, which now expose the |
|
2182 | to reflect new names in matplotlib, which now expose the | |
2177 | matlab-compatible interface via a pylab module instead of the |
|
2183 | matlab-compatible interface via a pylab module instead of the | |
2178 | 'matlab' name. The new code is backwards compatible, so users of |
|
2184 | 'matlab' name. The new code is backwards compatible, so users of | |
2179 | all matplotlib versions are OK. Patch by J. Hunter. |
|
2185 | all matplotlib versions are OK. Patch by J. Hunter. | |
2180 |
|
2186 | |||
2181 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing |
|
2187 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing | |
2182 | of __init__ docstrings for instances (class docstrings are already |
|
2188 | of __init__ docstrings for instances (class docstrings are already | |
2183 | automatically printed). Instances with customized docstrings |
|
2189 | automatically printed). Instances with customized docstrings | |
2184 | (indep. of the class) are also recognized and all 3 separate |
|
2190 | (indep. of the class) are also recognized and all 3 separate | |
2185 | docstrings are printed (instance, class, constructor). After some |
|
2191 | docstrings are printed (instance, class, constructor). After some | |
2186 | comments/suggestions by J. Hunter. |
|
2192 | comments/suggestions by J. Hunter. | |
2187 |
|
2193 | |||
2188 | 2004-12-05 Fernando Perez <fperez@colorado.edu> |
|
2194 | 2004-12-05 Fernando Perez <fperez@colorado.edu> | |
2189 |
|
2195 | |||
2190 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying |
|
2196 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying | |
2191 | warnings when tab-completion fails and triggers an exception. |
|
2197 | warnings when tab-completion fails and triggers an exception. | |
2192 |
|
2198 | |||
2193 | 2004-12-03 Fernando Perez <fperez@colorado.edu> |
|
2199 | 2004-12-03 Fernando Perez <fperez@colorado.edu> | |
2194 |
|
2200 | |||
2195 | * IPython/Magic.py (magic_prun): Fix bug where an exception would |
|
2201 | * IPython/Magic.py (magic_prun): Fix bug where an exception would | |
2196 | be triggered when using 'run -p'. An incorrect option flag was |
|
2202 | be triggered when using 'run -p'. An incorrect option flag was | |
2197 | being set ('d' instead of 'D'). |
|
2203 | being set ('d' instead of 'D'). | |
2198 | (manpage): fix missing escaped \- sign. |
|
2204 | (manpage): fix missing escaped \- sign. | |
2199 |
|
2205 | |||
2200 | 2004-11-30 *** Released version 0.6.5 |
|
2206 | 2004-11-30 *** Released version 0.6.5 | |
2201 |
|
2207 | |||
2202 | 2004-11-30 Fernando Perez <fperez@colorado.edu> |
|
2208 | 2004-11-30 Fernando Perez <fperez@colorado.edu> | |
2203 |
|
2209 | |||
2204 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint |
|
2210 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint | |
2205 | setting with -d option. |
|
2211 | setting with -d option. | |
2206 |
|
2212 | |||
2207 | * setup.py (docfiles): Fix problem where the doc glob I was using |
|
2213 | * setup.py (docfiles): Fix problem where the doc glob I was using | |
2208 | was COMPLETELY BROKEN. It was giving the right files by pure |
|
2214 | was COMPLETELY BROKEN. It was giving the right files by pure | |
2209 | accident, but failed once I tried to include ipython.el. Note: |
|
2215 | accident, but failed once I tried to include ipython.el. Note: | |
2210 | glob() does NOT allow you to do exclusion on multiple endings! |
|
2216 | glob() does NOT allow you to do exclusion on multiple endings! | |
2211 |
|
2217 | |||
2212 | 2004-11-29 Fernando Perez <fperez@colorado.edu> |
|
2218 | 2004-11-29 Fernando Perez <fperez@colorado.edu> | |
2213 |
|
2219 | |||
2214 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using |
|
2220 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using | |
2215 | the manpage as the source. Better formatting & consistency. |
|
2221 | the manpage as the source. Better formatting & consistency. | |
2216 |
|
2222 | |||
2217 | * IPython/Magic.py (magic_run): Added new -d option, to run |
|
2223 | * IPython/Magic.py (magic_run): Added new -d option, to run | |
2218 | scripts under the control of the python pdb debugger. Note that |
|
2224 | scripts under the control of the python pdb debugger. Note that | |
2219 | this required changing the %prun option -d to -D, to avoid a clash |
|
2225 | this required changing the %prun option -d to -D, to avoid a clash | |
2220 | (since %run must pass options to %prun, and getopt is too dumb to |
|
2226 | (since %run must pass options to %prun, and getopt is too dumb to | |
2221 | handle options with string values with embedded spaces). Thanks |
|
2227 | handle options with string values with embedded spaces). Thanks | |
2222 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. |
|
2228 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. | |
2223 | (magic_who_ls): added type matching to %who and %whos, so that one |
|
2229 | (magic_who_ls): added type matching to %who and %whos, so that one | |
2224 | can filter their output to only include variables of certain |
|
2230 | can filter their output to only include variables of certain | |
2225 | types. Another suggestion by Matthew. |
|
2231 | types. Another suggestion by Matthew. | |
2226 | (magic_whos): Added memory summaries in kb and Mb for arrays. |
|
2232 | (magic_whos): Added memory summaries in kb and Mb for arrays. | |
2227 | (magic_who): Improve formatting (break lines every 9 vars). |
|
2233 | (magic_who): Improve formatting (break lines every 9 vars). | |
2228 |
|
2234 | |||
2229 | 2004-11-28 Fernando Perez <fperez@colorado.edu> |
|
2235 | 2004-11-28 Fernando Perez <fperez@colorado.edu> | |
2230 |
|
2236 | |||
2231 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input |
|
2237 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input | |
2232 | cache when empty lines were present. |
|
2238 | cache when empty lines were present. | |
2233 |
|
2239 | |||
2234 | 2004-11-24 Fernando Perez <fperez@colorado.edu> |
|
2240 | 2004-11-24 Fernando Perez <fperez@colorado.edu> | |
2235 |
|
2241 | |||
2236 | * IPython/usage.py (__doc__): document the re-activated threading |
|
2242 | * IPython/usage.py (__doc__): document the re-activated threading | |
2237 | options for WX and GTK. |
|
2243 | options for WX and GTK. | |
2238 |
|
2244 | |||
2239 | 2004-11-23 Fernando Perez <fperez@colorado.edu> |
|
2245 | 2004-11-23 Fernando Perez <fperez@colorado.edu> | |
2240 |
|
2246 | |||
2241 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate |
|
2247 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate | |
2242 | the -wthread and -gthread options, along with a new -tk one to try |
|
2248 | the -wthread and -gthread options, along with a new -tk one to try | |
2243 | and coordinate Tk threading with wx/gtk. The tk support is very |
|
2249 | and coordinate Tk threading with wx/gtk. The tk support is very | |
2244 | platform dependent, since it seems to require Tcl and Tk to be |
|
2250 | platform dependent, since it seems to require Tcl and Tk to be | |
2245 | built with threads (Fedora1/2 appears NOT to have it, but in |
|
2251 | built with threads (Fedora1/2 appears NOT to have it, but in | |
2246 | Prabhu's Debian boxes it works OK). But even with some Tk |
|
2252 | Prabhu's Debian boxes it works OK). But even with some Tk | |
2247 | limitations, this is a great improvement. |
|
2253 | limitations, this is a great improvement. | |
2248 |
|
2254 | |||
2249 | * IPython/Prompts.py (prompt_specials_color): Added \t for time |
|
2255 | * IPython/Prompts.py (prompt_specials_color): Added \t for time | |
2250 | info in user prompts. Patch by Prabhu. |
|
2256 | info in user prompts. Patch by Prabhu. | |
2251 |
|
2257 | |||
2252 | 2004-11-18 Fernando Perez <fperez@colorado.edu> |
|
2258 | 2004-11-18 Fernando Perez <fperez@colorado.edu> | |
2253 |
|
2259 | |||
2254 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 |
|
2260 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 | |
2255 | EOFErrors and bail, to avoid infinite loops if a non-terminating |
|
2261 | EOFErrors and bail, to avoid infinite loops if a non-terminating | |
2256 | file is fed into ipython. Patch submitted in issue 19 by user, |
|
2262 | file is fed into ipython. Patch submitted in issue 19 by user, | |
2257 | many thanks. |
|
2263 | many thanks. | |
2258 |
|
2264 | |||
2259 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger |
|
2265 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger | |
2260 | autoquote/parens in continuation prompts, which can cause lots of |
|
2266 | autoquote/parens in continuation prompts, which can cause lots of | |
2261 | problems. Closes roundup issue 20. |
|
2267 | problems. Closes roundup issue 20. | |
2262 |
|
2268 | |||
2263 | 2004-11-17 Fernando Perez <fperez@colorado.edu> |
|
2269 | 2004-11-17 Fernando Perez <fperez@colorado.edu> | |
2264 |
|
2270 | |||
2265 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, |
|
2271 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, | |
2266 | reported as debian bug #280505. I'm not sure my local changelog |
|
2272 | reported as debian bug #280505. I'm not sure my local changelog | |
2267 | entry has the proper debian format (Jack?). |
|
2273 | entry has the proper debian format (Jack?). | |
2268 |
|
2274 | |||
2269 | 2004-11-08 *** Released version 0.6.4 |
|
2275 | 2004-11-08 *** Released version 0.6.4 | |
2270 |
|
2276 | |||
2271 | 2004-11-08 Fernando Perez <fperez@colorado.edu> |
|
2277 | 2004-11-08 Fernando Perez <fperez@colorado.edu> | |
2272 |
|
2278 | |||
2273 | * IPython/iplib.py (init_readline): Fix exit message for Windows |
|
2279 | * IPython/iplib.py (init_readline): Fix exit message for Windows | |
2274 | when readline is active. Thanks to a report by Eric Jones |
|
2280 | when readline is active. Thanks to a report by Eric Jones | |
2275 | <eric-AT-enthought.com>. |
|
2281 | <eric-AT-enthought.com>. | |
2276 |
|
2282 | |||
2277 | 2004-11-07 Fernando Perez <fperez@colorado.edu> |
|
2283 | 2004-11-07 Fernando Perez <fperez@colorado.edu> | |
2278 |
|
2284 | |||
2279 | * IPython/genutils.py (page): Add a trap for OSError exceptions, |
|
2285 | * IPython/genutils.py (page): Add a trap for OSError exceptions, | |
2280 | sometimes seen by win2k/cygwin users. |
|
2286 | sometimes seen by win2k/cygwin users. | |
2281 |
|
2287 | |||
2282 | 2004-11-06 Fernando Perez <fperez@colorado.edu> |
|
2288 | 2004-11-06 Fernando Perez <fperez@colorado.edu> | |
2283 |
|
2289 | |||
2284 | * IPython/iplib.py (interact): Change the handling of %Exit from |
|
2290 | * IPython/iplib.py (interact): Change the handling of %Exit from | |
2285 | trying to propagate a SystemExit to an internal ipython flag. |
|
2291 | trying to propagate a SystemExit to an internal ipython flag. | |
2286 | This is less elegant than using Python's exception mechanism, but |
|
2292 | This is less elegant than using Python's exception mechanism, but | |
2287 | I can't get that to work reliably with threads, so under -pylab |
|
2293 | I can't get that to work reliably with threads, so under -pylab | |
2288 | %Exit was hanging IPython. Cross-thread exception handling is |
|
2294 | %Exit was hanging IPython. Cross-thread exception handling is | |
2289 | really a bitch. Thaks to a bug report by Stephen Walton |
|
2295 | really a bitch. Thaks to a bug report by Stephen Walton | |
2290 | <stephen.walton-AT-csun.edu>. |
|
2296 | <stephen.walton-AT-csun.edu>. | |
2291 |
|
2297 | |||
2292 | 2004-11-04 Fernando Perez <fperez@colorado.edu> |
|
2298 | 2004-11-04 Fernando Perez <fperez@colorado.edu> | |
2293 |
|
2299 | |||
2294 | * IPython/iplib.py (raw_input_original): store a pointer to the |
|
2300 | * IPython/iplib.py (raw_input_original): store a pointer to the | |
2295 | true raw_input to harden against code which can modify it |
|
2301 | true raw_input to harden against code which can modify it | |
2296 | (wx.py.PyShell does this and would otherwise crash ipython). |
|
2302 | (wx.py.PyShell does this and would otherwise crash ipython). | |
2297 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. |
|
2303 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. | |
2298 |
|
2304 | |||
2299 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for |
|
2305 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for | |
2300 | Ctrl-C problem, which does not mess up the input line. |
|
2306 | Ctrl-C problem, which does not mess up the input line. | |
2301 |
|
2307 | |||
2302 | 2004-11-03 Fernando Perez <fperez@colorado.edu> |
|
2308 | 2004-11-03 Fernando Perez <fperez@colorado.edu> | |
2303 |
|
2309 | |||
2304 | * IPython/Release.py: Changed licensing to BSD, in all files. |
|
2310 | * IPython/Release.py: Changed licensing to BSD, in all files. | |
2305 | (name): lowercase name for tarball/RPM release. |
|
2311 | (name): lowercase name for tarball/RPM release. | |
2306 |
|
2312 | |||
2307 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for |
|
2313 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for | |
2308 | use throughout ipython. |
|
2314 | use throughout ipython. | |
2309 |
|
2315 | |||
2310 | * IPython/Magic.py (Magic._ofind): Switch to using the new |
|
2316 | * IPython/Magic.py (Magic._ofind): Switch to using the new | |
2311 | OInspect.getdoc() function. |
|
2317 | OInspect.getdoc() function. | |
2312 |
|
2318 | |||
2313 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution |
|
2319 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution | |
2314 | of the line currently being canceled via Ctrl-C. It's extremely |
|
2320 | of the line currently being canceled via Ctrl-C. It's extremely | |
2315 | ugly, but I don't know how to do it better (the problem is one of |
|
2321 | ugly, but I don't know how to do it better (the problem is one of | |
2316 | handling cross-thread exceptions). |
|
2322 | handling cross-thread exceptions). | |
2317 |
|
2323 | |||
2318 | 2004-10-28 Fernando Perez <fperez@colorado.edu> |
|
2324 | 2004-10-28 Fernando Perez <fperez@colorado.edu> | |
2319 |
|
2325 | |||
2320 | * IPython/Shell.py (signal_handler): add signal handlers to trap |
|
2326 | * IPython/Shell.py (signal_handler): add signal handlers to trap | |
2321 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug |
|
2327 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug | |
2322 | report by Francesc Alted. |
|
2328 | report by Francesc Alted. | |
2323 |
|
2329 | |||
2324 | 2004-10-21 Fernando Perez <fperez@colorado.edu> |
|
2330 | 2004-10-21 Fernando Perez <fperez@colorado.edu> | |
2325 |
|
2331 | |||
2326 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ |
|
2332 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ | |
2327 | to % for pysh syntax extensions. |
|
2333 | to % for pysh syntax extensions. | |
2328 |
|
2334 | |||
2329 | 2004-10-09 Fernando Perez <fperez@colorado.edu> |
|
2335 | 2004-10-09 Fernando Perez <fperez@colorado.edu> | |
2330 |
|
2336 | |||
2331 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric |
|
2337 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric | |
2332 | arrays to print a more useful summary, without calling str(arr). |
|
2338 | arrays to print a more useful summary, without calling str(arr). | |
2333 | This avoids the problem of extremely lengthy computations which |
|
2339 | This avoids the problem of extremely lengthy computations which | |
2334 | occur if arr is large, and appear to the user as a system lockup |
|
2340 | occur if arr is large, and appear to the user as a system lockup | |
2335 | with 100% cpu activity. After a suggestion by Kristian Sandberg |
|
2341 | with 100% cpu activity. After a suggestion by Kristian Sandberg | |
2336 | <Kristian.Sandberg@colorado.edu>. |
|
2342 | <Kristian.Sandberg@colorado.edu>. | |
2337 | (Magic.__init__): fix bug in global magic escapes not being |
|
2343 | (Magic.__init__): fix bug in global magic escapes not being | |
2338 | correctly set. |
|
2344 | correctly set. | |
2339 |
|
2345 | |||
2340 | 2004-10-08 Fernando Perez <fperez@colorado.edu> |
|
2346 | 2004-10-08 Fernando Perez <fperez@colorado.edu> | |
2341 |
|
2347 | |||
2342 | * IPython/Magic.py (__license__): change to absolute imports of |
|
2348 | * IPython/Magic.py (__license__): change to absolute imports of | |
2343 | ipython's own internal packages, to start adapting to the absolute |
|
2349 | ipython's own internal packages, to start adapting to the absolute | |
2344 | import requirement of PEP-328. |
|
2350 | import requirement of PEP-328. | |
2345 |
|
2351 | |||
2346 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all |
|
2352 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all | |
2347 | files, and standardize author/license marks through the Release |
|
2353 | files, and standardize author/license marks through the Release | |
2348 | module instead of having per/file stuff (except for files with |
|
2354 | module instead of having per/file stuff (except for files with | |
2349 | particular licenses, like the MIT/PSF-licensed codes). |
|
2355 | particular licenses, like the MIT/PSF-licensed codes). | |
2350 |
|
2356 | |||
2351 | * IPython/Debugger.py: remove dead code for python 2.1 |
|
2357 | * IPython/Debugger.py: remove dead code for python 2.1 | |
2352 |
|
2358 | |||
2353 | 2004-10-04 Fernando Perez <fperez@colorado.edu> |
|
2359 | 2004-10-04 Fernando Perez <fperez@colorado.edu> | |
2354 |
|
2360 | |||
2355 | * IPython/iplib.py (ipmagic): New function for accessing magics |
|
2361 | * IPython/iplib.py (ipmagic): New function for accessing magics | |
2356 | via a normal python function call. |
|
2362 | via a normal python function call. | |
2357 |
|
2363 | |||
2358 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape |
|
2364 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape | |
2359 | from '@' to '%', to accomodate the new @decorator syntax of python |
|
2365 | from '@' to '%', to accomodate the new @decorator syntax of python | |
2360 | 2.4. |
|
2366 | 2.4. | |
2361 |
|
2367 | |||
2362 | 2004-09-29 Fernando Perez <fperez@colorado.edu> |
|
2368 | 2004-09-29 Fernando Perez <fperez@colorado.edu> | |
2363 |
|
2369 | |||
2364 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to |
|
2370 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to | |
2365 | matplotlib.use to prevent running scripts which try to switch |
|
2371 | matplotlib.use to prevent running scripts which try to switch | |
2366 | interactive backends from within ipython. This will just crash |
|
2372 | interactive backends from within ipython. This will just crash | |
2367 | the python interpreter, so we can't allow it (but a detailed error |
|
2373 | the python interpreter, so we can't allow it (but a detailed error | |
2368 | is given to the user). |
|
2374 | is given to the user). | |
2369 |
|
2375 | |||
2370 | 2004-09-28 Fernando Perez <fperez@colorado.edu> |
|
2376 | 2004-09-28 Fernando Perez <fperez@colorado.edu> | |
2371 |
|
2377 | |||
2372 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): |
|
2378 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): | |
2373 | matplotlib-related fixes so that using @run with non-matplotlib |
|
2379 | matplotlib-related fixes so that using @run with non-matplotlib | |
2374 | scripts doesn't pop up spurious plot windows. This requires |
|
2380 | scripts doesn't pop up spurious plot windows. This requires | |
2375 | matplotlib >= 0.63, where I had to make some changes as well. |
|
2381 | matplotlib >= 0.63, where I had to make some changes as well. | |
2376 |
|
2382 | |||
2377 | * IPython/ipmaker.py (make_IPython): update version requirement to |
|
2383 | * IPython/ipmaker.py (make_IPython): update version requirement to | |
2378 | python 2.2. |
|
2384 | python 2.2. | |
2379 |
|
2385 | |||
2380 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional |
|
2386 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional | |
2381 | banner arg for embedded customization. |
|
2387 | banner arg for embedded customization. | |
2382 |
|
2388 | |||
2383 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all |
|
2389 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all | |
2384 | explicit uses of __IP as the IPython's instance name. Now things |
|
2390 | explicit uses of __IP as the IPython's instance name. Now things | |
2385 | are properly handled via the shell.name value. The actual code |
|
2391 | are properly handled via the shell.name value. The actual code | |
2386 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this |
|
2392 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this | |
2387 | is much better than before. I'll clean things completely when the |
|
2393 | is much better than before. I'll clean things completely when the | |
2388 | magic stuff gets a real overhaul. |
|
2394 | magic stuff gets a real overhaul. | |
2389 |
|
2395 | |||
2390 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in |
|
2396 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in | |
2391 | minor changes to debian dir. |
|
2397 | minor changes to debian dir. | |
2392 |
|
2398 | |||
2393 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a |
|
2399 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a | |
2394 | pointer to the shell itself in the interactive namespace even when |
|
2400 | pointer to the shell itself in the interactive namespace even when | |
2395 | a user-supplied dict is provided. This is needed for embedding |
|
2401 | a user-supplied dict is provided. This is needed for embedding | |
2396 | purposes (found by tests with Michel Sanner). |
|
2402 | purposes (found by tests with Michel Sanner). | |
2397 |
|
2403 | |||
2398 | 2004-09-27 Fernando Perez <fperez@colorado.edu> |
|
2404 | 2004-09-27 Fernando Perez <fperez@colorado.edu> | |
2399 |
|
2405 | |||
2400 | * IPython/UserConfig/ipythonrc: remove []{} from |
|
2406 | * IPython/UserConfig/ipythonrc: remove []{} from | |
2401 | readline_remove_delims, so that things like [modname.<TAB> do |
|
2407 | readline_remove_delims, so that things like [modname.<TAB> do | |
2402 | proper completion. This disables [].TAB, but that's a less common |
|
2408 | proper completion. This disables [].TAB, but that's a less common | |
2403 | case than module names in list comprehensions, for example. |
|
2409 | case than module names in list comprehensions, for example. | |
2404 | Thanks to a report by Andrea Riciputi. |
|
2410 | Thanks to a report by Andrea Riciputi. | |
2405 |
|
2411 | |||
2406 | 2004-09-09 Fernando Perez <fperez@colorado.edu> |
|
2412 | 2004-09-09 Fernando Perez <fperez@colorado.edu> | |
2407 |
|
2413 | |||
2408 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid |
|
2414 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid | |
2409 | blocking problems in win32 and osx. Fix by John. |
|
2415 | blocking problems in win32 and osx. Fix by John. | |
2410 |
|
2416 | |||
2411 | 2004-09-08 Fernando Perez <fperez@colorado.edu> |
|
2417 | 2004-09-08 Fernando Perez <fperez@colorado.edu> | |
2412 |
|
2418 | |||
2413 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug |
|
2419 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug | |
2414 | for Win32 and OSX. Fix by John Hunter. |
|
2420 | for Win32 and OSX. Fix by John Hunter. | |
2415 |
|
2421 | |||
2416 | 2004-08-30 *** Released version 0.6.3 |
|
2422 | 2004-08-30 *** Released version 0.6.3 | |
2417 |
|
2423 | |||
2418 | 2004-08-30 Fernando Perez <fperez@colorado.edu> |
|
2424 | 2004-08-30 Fernando Perez <fperez@colorado.edu> | |
2419 |
|
2425 | |||
2420 | * setup.py (isfile): Add manpages to list of dependent files to be |
|
2426 | * setup.py (isfile): Add manpages to list of dependent files to be | |
2421 | updated. |
|
2427 | updated. | |
2422 |
|
2428 | |||
2423 | 2004-08-27 Fernando Perez <fperez@colorado.edu> |
|
2429 | 2004-08-27 Fernando Perez <fperez@colorado.edu> | |
2424 |
|
2430 | |||
2425 | * IPython/Shell.py (start): I've disabled -wthread and -gthread |
|
2431 | * IPython/Shell.py (start): I've disabled -wthread and -gthread | |
2426 | for now. They don't really work with standalone WX/GTK code |
|
2432 | for now. They don't really work with standalone WX/GTK code | |
2427 | (though matplotlib IS working fine with both of those backends). |
|
2433 | (though matplotlib IS working fine with both of those backends). | |
2428 | This will neeed much more testing. I disabled most things with |
|
2434 | This will neeed much more testing. I disabled most things with | |
2429 | comments, so turning it back on later should be pretty easy. |
|
2435 | comments, so turning it back on later should be pretty easy. | |
2430 |
|
2436 | |||
2431 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental |
|
2437 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental | |
2432 | autocalling of expressions like r'foo', by modifying the line |
|
2438 | autocalling of expressions like r'foo', by modifying the line | |
2433 | split regexp. Closes |
|
2439 | split regexp. Closes | |
2434 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas |
|
2440 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas | |
2435 | Riley <ipythonbugs-AT-sabi.net>. |
|
2441 | Riley <ipythonbugs-AT-sabi.net>. | |
2436 | (InteractiveShell.mainloop): honor --nobanner with banner |
|
2442 | (InteractiveShell.mainloop): honor --nobanner with banner | |
2437 | extensions. |
|
2443 | extensions. | |
2438 |
|
2444 | |||
2439 | * IPython/Shell.py: Significant refactoring of all classes, so |
|
2445 | * IPython/Shell.py: Significant refactoring of all classes, so | |
2440 | that we can really support ALL matplotlib backends and threading |
|
2446 | that we can really support ALL matplotlib backends and threading | |
2441 | models (John spotted a bug with Tk which required this). Now we |
|
2447 | models (John spotted a bug with Tk which required this). Now we | |
2442 | should support single-threaded, WX-threads and GTK-threads, both |
|
2448 | should support single-threaded, WX-threads and GTK-threads, both | |
2443 | for generic code and for matplotlib. |
|
2449 | for generic code and for matplotlib. | |
2444 |
|
2450 | |||
2445 | * IPython/ipmaker.py (__call__): Changed -mpthread option to |
|
2451 | * IPython/ipmaker.py (__call__): Changed -mpthread option to | |
2446 | -pylab, to simplify things for users. Will also remove the pylab |
|
2452 | -pylab, to simplify things for users. Will also remove the pylab | |
2447 | profile, since now all of matplotlib configuration is directly |
|
2453 | profile, since now all of matplotlib configuration is directly | |
2448 | handled here. This also reduces startup time. |
|
2454 | handled here. This also reduces startup time. | |
2449 |
|
2455 | |||
2450 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of |
|
2456 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of | |
2451 | shell wasn't being correctly called. Also in IPShellWX. |
|
2457 | shell wasn't being correctly called. Also in IPShellWX. | |
2452 |
|
2458 | |||
2453 | * IPython/iplib.py (InteractiveShell.__init__): Added option to |
|
2459 | * IPython/iplib.py (InteractiveShell.__init__): Added option to | |
2454 | fine-tune banner. |
|
2460 | fine-tune banner. | |
2455 |
|
2461 | |||
2456 | * IPython/numutils.py (spike): Deprecate these spike functions, |
|
2462 | * IPython/numutils.py (spike): Deprecate these spike functions, | |
2457 | delete (long deprecated) gnuplot_exec handler. |
|
2463 | delete (long deprecated) gnuplot_exec handler. | |
2458 |
|
2464 | |||
2459 | 2004-08-26 Fernando Perez <fperez@colorado.edu> |
|
2465 | 2004-08-26 Fernando Perez <fperez@colorado.edu> | |
2460 |
|
2466 | |||
2461 | * ipython.1: Update for threading options, plus some others which |
|
2467 | * ipython.1: Update for threading options, plus some others which | |
2462 | were missing. |
|
2468 | were missing. | |
2463 |
|
2469 | |||
2464 | * IPython/ipmaker.py (__call__): Added -wthread option for |
|
2470 | * IPython/ipmaker.py (__call__): Added -wthread option for | |
2465 | wxpython thread handling. Make sure threading options are only |
|
2471 | wxpython thread handling. Make sure threading options are only | |
2466 | valid at the command line. |
|
2472 | valid at the command line. | |
2467 |
|
2473 | |||
2468 | * scripts/ipython: moved shell selection into a factory function |
|
2474 | * scripts/ipython: moved shell selection into a factory function | |
2469 | in Shell.py, to keep the starter script to a minimum. |
|
2475 | in Shell.py, to keep the starter script to a minimum. | |
2470 |
|
2476 | |||
2471 | 2004-08-25 Fernando Perez <fperez@colorado.edu> |
|
2477 | 2004-08-25 Fernando Perez <fperez@colorado.edu> | |
2472 |
|
2478 | |||
2473 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by |
|
2479 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by | |
2474 | John. Along with some recent changes he made to matplotlib, the |
|
2480 | John. Along with some recent changes he made to matplotlib, the | |
2475 | next versions of both systems should work very well together. |
|
2481 | next versions of both systems should work very well together. | |
2476 |
|
2482 | |||
2477 | 2004-08-24 Fernando Perez <fperez@colorado.edu> |
|
2483 | 2004-08-24 Fernando Perez <fperez@colorado.edu> | |
2478 |
|
2484 | |||
2479 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I |
|
2485 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I | |
2480 | tried to switch the profiling to using hotshot, but I'm getting |
|
2486 | tried to switch the profiling to using hotshot, but I'm getting | |
2481 | strange errors from prof.runctx() there. I may be misreading the |
|
2487 | strange errors from prof.runctx() there. I may be misreading the | |
2482 | docs, but it looks weird. For now the profiling code will |
|
2488 | docs, but it looks weird. For now the profiling code will | |
2483 | continue to use the standard profiler. |
|
2489 | continue to use the standard profiler. | |
2484 |
|
2490 | |||
2485 | 2004-08-23 Fernando Perez <fperez@colorado.edu> |
|
2491 | 2004-08-23 Fernando Perez <fperez@colorado.edu> | |
2486 |
|
2492 | |||
2487 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX |
|
2493 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX | |
2488 | threaded shell, by John Hunter. It's not quite ready yet, but |
|
2494 | threaded shell, by John Hunter. It's not quite ready yet, but | |
2489 | close. |
|
2495 | close. | |
2490 |
|
2496 | |||
2491 | 2004-08-22 Fernando Perez <fperez@colorado.edu> |
|
2497 | 2004-08-22 Fernando Perez <fperez@colorado.edu> | |
2492 |
|
2498 | |||
2493 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also |
|
2499 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also | |
2494 | in Magic and ultraTB. |
|
2500 | in Magic and ultraTB. | |
2495 |
|
2501 | |||
2496 | * ipython.1: document threading options in manpage. |
|
2502 | * ipython.1: document threading options in manpage. | |
2497 |
|
2503 | |||
2498 | * scripts/ipython: Changed name of -thread option to -gthread, |
|
2504 | * scripts/ipython: Changed name of -thread option to -gthread, | |
2499 | since this is GTK specific. I want to leave the door open for a |
|
2505 | since this is GTK specific. I want to leave the door open for a | |
2500 | -wthread option for WX, which will most likely be necessary. This |
|
2506 | -wthread option for WX, which will most likely be necessary. This | |
2501 | change affects usage and ipmaker as well. |
|
2507 | change affects usage and ipmaker as well. | |
2502 |
|
2508 | |||
2503 | * IPython/Shell.py (matplotlib_shell): Add a factory function to |
|
2509 | * IPython/Shell.py (matplotlib_shell): Add a factory function to | |
2504 | handle the matplotlib shell issues. Code by John Hunter |
|
2510 | handle the matplotlib shell issues. Code by John Hunter | |
2505 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
2511 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
2506 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's |
|
2512 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's | |
2507 | broken (and disabled for end users) for now, but it puts the |
|
2513 | broken (and disabled for end users) for now, but it puts the | |
2508 | infrastructure in place. |
|
2514 | infrastructure in place. | |
2509 |
|
2515 | |||
2510 | 2004-08-21 Fernando Perez <fperez@colorado.edu> |
|
2516 | 2004-08-21 Fernando Perez <fperez@colorado.edu> | |
2511 |
|
2517 | |||
2512 | * ipythonrc-pylab: Add matplotlib support. |
|
2518 | * ipythonrc-pylab: Add matplotlib support. | |
2513 |
|
2519 | |||
2514 | * matplotlib_config.py: new files for matplotlib support, part of |
|
2520 | * matplotlib_config.py: new files for matplotlib support, part of | |
2515 | the pylab profile. |
|
2521 | the pylab profile. | |
2516 |
|
2522 | |||
2517 | * IPython/usage.py (__doc__): documented the threading options. |
|
2523 | * IPython/usage.py (__doc__): documented the threading options. | |
2518 |
|
2524 | |||
2519 | 2004-08-20 Fernando Perez <fperez@colorado.edu> |
|
2525 | 2004-08-20 Fernando Perez <fperez@colorado.edu> | |
2520 |
|
2526 | |||
2521 | * ipython: Modified the main calling routine to handle the -thread |
|
2527 | * ipython: Modified the main calling routine to handle the -thread | |
2522 | and -mpthread options. This needs to be done as a top-level hack, |
|
2528 | and -mpthread options. This needs to be done as a top-level hack, | |
2523 | because it determines which class to instantiate for IPython |
|
2529 | because it determines which class to instantiate for IPython | |
2524 | itself. |
|
2530 | itself. | |
2525 |
|
2531 | |||
2526 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of |
|
2532 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of | |
2527 | classes to support multithreaded GTK operation without blocking, |
|
2533 | classes to support multithreaded GTK operation without blocking, | |
2528 | and matplotlib with all backends. This is a lot of still very |
|
2534 | and matplotlib with all backends. This is a lot of still very | |
2529 | experimental code, and threads are tricky. So it may still have a |
|
2535 | experimental code, and threads are tricky. So it may still have a | |
2530 | few rough edges... This code owes a lot to |
|
2536 | few rough edges... This code owes a lot to | |
2531 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by |
|
2537 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by | |
2532 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and |
|
2538 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and | |
2533 | to John Hunter for all the matplotlib work. |
|
2539 | to John Hunter for all the matplotlib work. | |
2534 |
|
2540 | |||
2535 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread |
|
2541 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread | |
2536 | options for gtk thread and matplotlib support. |
|
2542 | options for gtk thread and matplotlib support. | |
2537 |
|
2543 | |||
2538 | 2004-08-16 Fernando Perez <fperez@colorado.edu> |
|
2544 | 2004-08-16 Fernando Perez <fperez@colorado.edu> | |
2539 |
|
2545 | |||
2540 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger |
|
2546 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger | |
2541 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug |
|
2547 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug | |
2542 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. |
|
2548 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. | |
2543 |
|
2549 | |||
2544 | 2004-08-11 Fernando Perez <fperez@colorado.edu> |
|
2550 | 2004-08-11 Fernando Perez <fperez@colorado.edu> | |
2545 |
|
2551 | |||
2546 | * setup.py (isfile): Fix build so documentation gets updated for |
|
2552 | * setup.py (isfile): Fix build so documentation gets updated for | |
2547 | rpms (it was only done for .tgz builds). |
|
2553 | rpms (it was only done for .tgz builds). | |
2548 |
|
2554 | |||
2549 | 2004-08-10 Fernando Perez <fperez@colorado.edu> |
|
2555 | 2004-08-10 Fernando Perez <fperez@colorado.edu> | |
2550 |
|
2556 | |||
2551 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). |
|
2557 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). | |
2552 |
|
2558 | |||
2553 | * iplib.py : Silence syntax error exceptions in tab-completion. |
|
2559 | * iplib.py : Silence syntax error exceptions in tab-completion. | |
2554 |
|
2560 | |||
2555 | 2004-08-05 Fernando Perez <fperez@colorado.edu> |
|
2561 | 2004-08-05 Fernando Perez <fperez@colorado.edu> | |
2556 |
|
2562 | |||
2557 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set |
|
2563 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set | |
2558 | 'color off' mark for continuation prompts. This was causing long |
|
2564 | 'color off' mark for continuation prompts. This was causing long | |
2559 | continuation lines to mis-wrap. |
|
2565 | continuation lines to mis-wrap. | |
2560 |
|
2566 | |||
2561 | 2004-08-01 Fernando Perez <fperez@colorado.edu> |
|
2567 | 2004-08-01 Fernando Perez <fperez@colorado.edu> | |
2562 |
|
2568 | |||
2563 | * IPython/ipmaker.py (make_IPython): Allow the shell class used |
|
2569 | * IPython/ipmaker.py (make_IPython): Allow the shell class used | |
2564 | for building ipython to be a parameter. All this is necessary |
|
2570 | for building ipython to be a parameter. All this is necessary | |
2565 | right now to have a multithreaded version, but this insane |
|
2571 | right now to have a multithreaded version, but this insane | |
2566 | non-design will be cleaned up soon. For now, it's a hack that |
|
2572 | non-design will be cleaned up soon. For now, it's a hack that | |
2567 | works. |
|
2573 | works. | |
2568 |
|
2574 | |||
2569 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default |
|
2575 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default | |
2570 | args in various places. No bugs so far, but it's a dangerous |
|
2576 | args in various places. No bugs so far, but it's a dangerous | |
2571 | practice. |
|
2577 | practice. | |
2572 |
|
2578 | |||
2573 | 2004-07-31 Fernando Perez <fperez@colorado.edu> |
|
2579 | 2004-07-31 Fernando Perez <fperez@colorado.edu> | |
2574 |
|
2580 | |||
2575 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to |
|
2581 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to | |
2576 | fix completion of files with dots in their names under most |
|
2582 | fix completion of files with dots in their names under most | |
2577 | profiles (pysh was OK because the completion order is different). |
|
2583 | profiles (pysh was OK because the completion order is different). | |
2578 |
|
2584 | |||
2579 | 2004-07-27 Fernando Perez <fperez@colorado.edu> |
|
2585 | 2004-07-27 Fernando Perez <fperez@colorado.edu> | |
2580 |
|
2586 | |||
2581 | * IPython/iplib.py (InteractiveShell.__init__): build dict of |
|
2587 | * IPython/iplib.py (InteractiveShell.__init__): build dict of | |
2582 | keywords manually, b/c the one in keyword.py was removed in python |
|
2588 | keywords manually, b/c the one in keyword.py was removed in python | |
2583 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. |
|
2589 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. | |
2584 | This is NOT a bug under python 2.3 and earlier. |
|
2590 | This is NOT a bug under python 2.3 and earlier. | |
2585 |
|
2591 | |||
2586 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
2592 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
2587 |
|
2593 | |||
2588 | * IPython/ultraTB.py (VerboseTB.text): Add another |
|
2594 | * IPython/ultraTB.py (VerboseTB.text): Add another | |
2589 | linecache.checkcache() call to try to prevent inspect.py from |
|
2595 | linecache.checkcache() call to try to prevent inspect.py from | |
2590 | crashing under python 2.3. I think this fixes |
|
2596 | crashing under python 2.3. I think this fixes | |
2591 | http://www.scipy.net/roundup/ipython/issue17. |
|
2597 | http://www.scipy.net/roundup/ipython/issue17. | |
2592 |
|
2598 | |||
2593 | 2004-07-26 *** Released version 0.6.2 |
|
2599 | 2004-07-26 *** Released version 0.6.2 | |
2594 |
|
2600 | |||
2595 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
2601 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
2596 |
|
2602 | |||
2597 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would |
|
2603 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would | |
2598 | fail for any number. |
|
2604 | fail for any number. | |
2599 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for |
|
2605 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for | |
2600 | empty bookmarks. |
|
2606 | empty bookmarks. | |
2601 |
|
2607 | |||
2602 | 2004-07-26 *** Released version 0.6.1 |
|
2608 | 2004-07-26 *** Released version 0.6.1 | |
2603 |
|
2609 | |||
2604 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
2610 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
2605 |
|
2611 | |||
2606 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. |
|
2612 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. | |
2607 |
|
2613 | |||
2608 | * IPython/iplib.py (protect_filename): Applied Ville's patch for |
|
2614 | * IPython/iplib.py (protect_filename): Applied Ville's patch for | |
2609 | escaping '()[]{}' in filenames. |
|
2615 | escaping '()[]{}' in filenames. | |
2610 |
|
2616 | |||
2611 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for |
|
2617 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for | |
2612 | Python 2.2 users who lack a proper shlex.split. |
|
2618 | Python 2.2 users who lack a proper shlex.split. | |
2613 |
|
2619 | |||
2614 | 2004-07-19 Fernando Perez <fperez@colorado.edu> |
|
2620 | 2004-07-19 Fernando Perez <fperez@colorado.edu> | |
2615 |
|
2621 | |||
2616 | * IPython/iplib.py (InteractiveShell.init_readline): Add support |
|
2622 | * IPython/iplib.py (InteractiveShell.init_readline): Add support | |
2617 | for reading readline's init file. I follow the normal chain: |
|
2623 | for reading readline's init file. I follow the normal chain: | |
2618 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a |
|
2624 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a | |
2619 | report by Mike Heeter. This closes |
|
2625 | report by Mike Heeter. This closes | |
2620 | http://www.scipy.net/roundup/ipython/issue16. |
|
2626 | http://www.scipy.net/roundup/ipython/issue16. | |
2621 |
|
2627 | |||
2622 | 2004-07-18 Fernando Perez <fperez@colorado.edu> |
|
2628 | 2004-07-18 Fernando Perez <fperez@colorado.edu> | |
2623 |
|
2629 | |||
2624 | * IPython/iplib.py (__init__): Add better handling of '\' under |
|
2630 | * IPython/iplib.py (__init__): Add better handling of '\' under | |
2625 | Win32 for filenames. After a patch by Ville. |
|
2631 | Win32 for filenames. After a patch by Ville. | |
2626 |
|
2632 | |||
2627 | 2004-07-17 Fernando Perez <fperez@colorado.edu> |
|
2633 | 2004-07-17 Fernando Perez <fperez@colorado.edu> | |
2628 |
|
2634 | |||
2629 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
2635 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
2630 | autocalling would be triggered for 'foo is bar' if foo is |
|
2636 | autocalling would be triggered for 'foo is bar' if foo is | |
2631 | callable. I also cleaned up the autocall detection code to use a |
|
2637 | callable. I also cleaned up the autocall detection code to use a | |
2632 | regexp, which is faster. Bug reported by Alexander Schmolck. |
|
2638 | regexp, which is faster. Bug reported by Alexander Schmolck. | |
2633 |
|
2639 | |||
2634 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with |
|
2640 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with | |
2635 | '?' in them would confuse the help system. Reported by Alex |
|
2641 | '?' in them would confuse the help system. Reported by Alex | |
2636 | Schmolck. |
|
2642 | Schmolck. | |
2637 |
|
2643 | |||
2638 | 2004-07-16 Fernando Perez <fperez@colorado.edu> |
|
2644 | 2004-07-16 Fernando Perez <fperez@colorado.edu> | |
2639 |
|
2645 | |||
2640 | * IPython/GnuplotInteractive.py (__all__): added plot2. |
|
2646 | * IPython/GnuplotInteractive.py (__all__): added plot2. | |
2641 |
|
2647 | |||
2642 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for |
|
2648 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for | |
2643 | plotting dictionaries, lists or tuples of 1d arrays. |
|
2649 | plotting dictionaries, lists or tuples of 1d arrays. | |
2644 |
|
2650 | |||
2645 | * IPython/Magic.py (Magic.magic_hist): small clenaups and |
|
2651 | * IPython/Magic.py (Magic.magic_hist): small clenaups and | |
2646 | optimizations. |
|
2652 | optimizations. | |
2647 |
|
2653 | |||
2648 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is |
|
2654 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is | |
2649 | the information which was there from Janko's original IPP code: |
|
2655 | the information which was there from Janko's original IPP code: | |
2650 |
|
2656 | |||
2651 | 03.05.99 20:53 porto.ifm.uni-kiel.de |
|
2657 | 03.05.99 20:53 porto.ifm.uni-kiel.de | |
2652 | --Started changelog. |
|
2658 | --Started changelog. | |
2653 | --make clear do what it say it does |
|
2659 | --make clear do what it say it does | |
2654 | --added pretty output of lines from inputcache |
|
2660 | --added pretty output of lines from inputcache | |
2655 | --Made Logger a mixin class, simplifies handling of switches |
|
2661 | --Made Logger a mixin class, simplifies handling of switches | |
2656 | --Added own completer class. .string<TAB> expands to last history |
|
2662 | --Added own completer class. .string<TAB> expands to last history | |
2657 | line which starts with string. The new expansion is also present |
|
2663 | line which starts with string. The new expansion is also present | |
2658 | with Ctrl-r from the readline library. But this shows, who this |
|
2664 | with Ctrl-r from the readline library. But this shows, who this | |
2659 | can be done for other cases. |
|
2665 | can be done for other cases. | |
2660 | --Added convention that all shell functions should accept a |
|
2666 | --Added convention that all shell functions should accept a | |
2661 | parameter_string This opens the door for different behaviour for |
|
2667 | parameter_string This opens the door for different behaviour for | |
2662 | each function. @cd is a good example of this. |
|
2668 | each function. @cd is a good example of this. | |
2663 |
|
2669 | |||
2664 | 04.05.99 12:12 porto.ifm.uni-kiel.de |
|
2670 | 04.05.99 12:12 porto.ifm.uni-kiel.de | |
2665 | --added logfile rotation |
|
2671 | --added logfile rotation | |
2666 | --added new mainloop method which freezes first the namespace |
|
2672 | --added new mainloop method which freezes first the namespace | |
2667 |
|
2673 | |||
2668 | 07.05.99 21:24 porto.ifm.uni-kiel.de |
|
2674 | 07.05.99 21:24 porto.ifm.uni-kiel.de | |
2669 | --added the docreader classes. Now there is a help system. |
|
2675 | --added the docreader classes. Now there is a help system. | |
2670 | -This is only a first try. Currently it's not easy to put new |
|
2676 | -This is only a first try. Currently it's not easy to put new | |
2671 | stuff in the indices. But this is the way to go. Info would be |
|
2677 | stuff in the indices. But this is the way to go. Info would be | |
2672 | better, but HTML is every where and not everybody has an info |
|
2678 | better, but HTML is every where and not everybody has an info | |
2673 | system installed and it's not so easy to change html-docs to info. |
|
2679 | system installed and it's not so easy to change html-docs to info. | |
2674 | --added global logfile option |
|
2680 | --added global logfile option | |
2675 | --there is now a hook for object inspection method pinfo needs to |
|
2681 | --there is now a hook for object inspection method pinfo needs to | |
2676 | be provided for this. Can be reached by two '??'. |
|
2682 | be provided for this. Can be reached by two '??'. | |
2677 |
|
2683 | |||
2678 | 08.05.99 20:51 porto.ifm.uni-kiel.de |
|
2684 | 08.05.99 20:51 porto.ifm.uni-kiel.de | |
2679 | --added a README |
|
2685 | --added a README | |
2680 | --bug in rc file. Something has changed so functions in the rc |
|
2686 | --bug in rc file. Something has changed so functions in the rc | |
2681 | file need to reference the shell and not self. Not clear if it's a |
|
2687 | file need to reference the shell and not self. Not clear if it's a | |
2682 | bug or feature. |
|
2688 | bug or feature. | |
2683 | --changed rc file for new behavior |
|
2689 | --changed rc file for new behavior | |
2684 |
|
2690 | |||
2685 | 2004-07-15 Fernando Perez <fperez@colorado.edu> |
|
2691 | 2004-07-15 Fernando Perez <fperez@colorado.edu> | |
2686 |
|
2692 | |||
2687 | * IPython/Logger.py (Logger.log): fixed recent bug where the input |
|
2693 | * IPython/Logger.py (Logger.log): fixed recent bug where the input | |
2688 | cache was falling out of sync in bizarre manners when multi-line |
|
2694 | cache was falling out of sync in bizarre manners when multi-line | |
2689 | input was present. Minor optimizations and cleanup. |
|
2695 | input was present. Minor optimizations and cleanup. | |
2690 |
|
2696 | |||
2691 | (Logger): Remove old Changelog info for cleanup. This is the |
|
2697 | (Logger): Remove old Changelog info for cleanup. This is the | |
2692 | information which was there from Janko's original code: |
|
2698 | information which was there from Janko's original code: | |
2693 |
|
2699 | |||
2694 | Changes to Logger: - made the default log filename a parameter |
|
2700 | Changes to Logger: - made the default log filename a parameter | |
2695 |
|
2701 | |||
2696 | - put a check for lines beginning with !@? in log(). Needed |
|
2702 | - put a check for lines beginning with !@? in log(). Needed | |
2697 | (even if the handlers properly log their lines) for mid-session |
|
2703 | (even if the handlers properly log their lines) for mid-session | |
2698 | logging activation to work properly. Without this, lines logged |
|
2704 | logging activation to work properly. Without this, lines logged | |
2699 | in mid session, which get read from the cache, would end up |
|
2705 | in mid session, which get read from the cache, would end up | |
2700 | 'bare' (with !@? in the open) in the log. Now they are caught |
|
2706 | 'bare' (with !@? in the open) in the log. Now they are caught | |
2701 | and prepended with a #. |
|
2707 | and prepended with a #. | |
2702 |
|
2708 | |||
2703 | * IPython/iplib.py (InteractiveShell.init_readline): added check |
|
2709 | * IPython/iplib.py (InteractiveShell.init_readline): added check | |
2704 | in case MagicCompleter fails to be defined, so we don't crash. |
|
2710 | in case MagicCompleter fails to be defined, so we don't crash. | |
2705 |
|
2711 | |||
2706 | 2004-07-13 Fernando Perez <fperez@colorado.edu> |
|
2712 | 2004-07-13 Fernando Perez <fperez@colorado.edu> | |
2707 |
|
2713 | |||
2708 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation |
|
2714 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation | |
2709 | of EPS if the requested filename ends in '.eps'. |
|
2715 | of EPS if the requested filename ends in '.eps'. | |
2710 |
|
2716 | |||
2711 | 2004-07-04 Fernando Perez <fperez@colorado.edu> |
|
2717 | 2004-07-04 Fernando Perez <fperez@colorado.edu> | |
2712 |
|
2718 | |||
2713 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix |
|
2719 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix | |
2714 | escaping of quotes when calling the shell. |
|
2720 | escaping of quotes when calling the shell. | |
2715 |
|
2721 | |||
2716 | 2004-07-02 Fernando Perez <fperez@colorado.edu> |
|
2722 | 2004-07-02 Fernando Perez <fperez@colorado.edu> | |
2717 |
|
2723 | |||
2718 | * IPython/Prompts.py (CachedOutput.update): Fix problem with |
|
2724 | * IPython/Prompts.py (CachedOutput.update): Fix problem with | |
2719 | gettext not working because we were clobbering '_'. Fixes |
|
2725 | gettext not working because we were clobbering '_'. Fixes | |
2720 | http://www.scipy.net/roundup/ipython/issue6. |
|
2726 | http://www.scipy.net/roundup/ipython/issue6. | |
2721 |
|
2727 | |||
2722 | 2004-07-01 Fernando Perez <fperez@colorado.edu> |
|
2728 | 2004-07-01 Fernando Perez <fperez@colorado.edu> | |
2723 |
|
2729 | |||
2724 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling |
|
2730 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling | |
2725 | into @cd. Patch by Ville. |
|
2731 | into @cd. Patch by Ville. | |
2726 |
|
2732 | |||
2727 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
2733 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
2728 | new function to store things after ipmaker runs. Patch by Ville. |
|
2734 | new function to store things after ipmaker runs. Patch by Ville. | |
2729 | Eventually this will go away once ipmaker is removed and the class |
|
2735 | Eventually this will go away once ipmaker is removed and the class | |
2730 | gets cleaned up, but for now it's ok. Key functionality here is |
|
2736 | gets cleaned up, but for now it's ok. Key functionality here is | |
2731 | the addition of the persistent storage mechanism, a dict for |
|
2737 | the addition of the persistent storage mechanism, a dict for | |
2732 | keeping data across sessions (for now just bookmarks, but more can |
|
2738 | keeping data across sessions (for now just bookmarks, but more can | |
2733 | be implemented later). |
|
2739 | be implemented later). | |
2734 |
|
2740 | |||
2735 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, |
|
2741 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, | |
2736 | persistent across sections. Patch by Ville, I modified it |
|
2742 | persistent across sections. Patch by Ville, I modified it | |
2737 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also |
|
2743 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also | |
2738 | added a '-l' option to list all bookmarks. |
|
2744 | added a '-l' option to list all bookmarks. | |
2739 |
|
2745 | |||
2740 | * IPython/iplib.py (InteractiveShell.atexit_operations): new |
|
2746 | * IPython/iplib.py (InteractiveShell.atexit_operations): new | |
2741 | center for cleanup. Registered with atexit.register(). I moved |
|
2747 | center for cleanup. Registered with atexit.register(). I moved | |
2742 | here the old exit_cleanup(). After a patch by Ville. |
|
2748 | here the old exit_cleanup(). After a patch by Ville. | |
2743 |
|
2749 | |||
2744 | * IPython/Magic.py (get_py_filename): added '~' to the accepted |
|
2750 | * IPython/Magic.py (get_py_filename): added '~' to the accepted | |
2745 | characters in the hacked shlex_split for python 2.2. |
|
2751 | characters in the hacked shlex_split for python 2.2. | |
2746 |
|
2752 | |||
2747 | * IPython/iplib.py (file_matches): more fixes to filenames with |
|
2753 | * IPython/iplib.py (file_matches): more fixes to filenames with | |
2748 | whitespace in them. It's not perfect, but limitations in python's |
|
2754 | whitespace in them. It's not perfect, but limitations in python's | |
2749 | readline make it impossible to go further. |
|
2755 | readline make it impossible to go further. | |
2750 |
|
2756 | |||
2751 | 2004-06-29 Fernando Perez <fperez@colorado.edu> |
|
2757 | 2004-06-29 Fernando Perez <fperez@colorado.edu> | |
2752 |
|
2758 | |||
2753 | * IPython/iplib.py (file_matches): escape whitespace correctly in |
|
2759 | * IPython/iplib.py (file_matches): escape whitespace correctly in | |
2754 | filename completions. Bug reported by Ville. |
|
2760 | filename completions. Bug reported by Ville. | |
2755 |
|
2761 | |||
2756 | 2004-06-28 Fernando Perez <fperez@colorado.edu> |
|
2762 | 2004-06-28 Fernando Perez <fperez@colorado.edu> | |
2757 |
|
2763 | |||
2758 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now |
|
2764 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now | |
2759 | the history file will be called 'history-PROFNAME' (or just |
|
2765 | the history file will be called 'history-PROFNAME' (or just | |
2760 | 'history' if no profile is loaded). I was getting annoyed at |
|
2766 | 'history' if no profile is loaded). I was getting annoyed at | |
2761 | getting my Numerical work history clobbered by pysh sessions. |
|
2767 | getting my Numerical work history clobbered by pysh sessions. | |
2762 |
|
2768 | |||
2763 | * IPython/iplib.py (InteractiveShell.__init__): Internal |
|
2769 | * IPython/iplib.py (InteractiveShell.__init__): Internal | |
2764 | getoutputerror() function so that we can honor the system_verbose |
|
2770 | getoutputerror() function so that we can honor the system_verbose | |
2765 | flag for _all_ system calls. I also added escaping of # |
|
2771 | flag for _all_ system calls. I also added escaping of # | |
2766 | characters here to avoid confusing Itpl. |
|
2772 | characters here to avoid confusing Itpl. | |
2767 |
|
2773 | |||
2768 | * IPython/Magic.py (shlex_split): removed call to shell in |
|
2774 | * IPython/Magic.py (shlex_split): removed call to shell in | |
2769 | parse_options and replaced it with shlex.split(). The annoying |
|
2775 | parse_options and replaced it with shlex.split(). The annoying | |
2770 | part was that in Python 2.2, shlex.split() doesn't exist, so I had |
|
2776 | part was that in Python 2.2, shlex.split() doesn't exist, so I had | |
2771 | to backport it from 2.3, with several frail hacks (the shlex |
|
2777 | to backport it from 2.3, with several frail hacks (the shlex | |
2772 | module is rather limited in 2.2). Thanks to a suggestion by Ville |
|
2778 | module is rather limited in 2.2). Thanks to a suggestion by Ville | |
2773 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no |
|
2779 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no | |
2774 | problem. |
|
2780 | problem. | |
2775 |
|
2781 | |||
2776 | (Magic.magic_system_verbose): new toggle to print the actual |
|
2782 | (Magic.magic_system_verbose): new toggle to print the actual | |
2777 | system calls made by ipython. Mainly for debugging purposes. |
|
2783 | system calls made by ipython. Mainly for debugging purposes. | |
2778 |
|
2784 | |||
2779 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which |
|
2785 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which | |
2780 | doesn't support persistence. Reported (and fix suggested) by |
|
2786 | doesn't support persistence. Reported (and fix suggested) by | |
2781 | Travis Caldwell <travis_caldwell2000@yahoo.com>. |
|
2787 | Travis Caldwell <travis_caldwell2000@yahoo.com>. | |
2782 |
|
2788 | |||
2783 | 2004-06-26 Fernando Perez <fperez@colorado.edu> |
|
2789 | 2004-06-26 Fernando Perez <fperez@colorado.edu> | |
2784 |
|
2790 | |||
2785 | * IPython/Logger.py (Logger.log): fix to handle correctly empty |
|
2791 | * IPython/Logger.py (Logger.log): fix to handle correctly empty | |
2786 | continue prompts. |
|
2792 | continue prompts. | |
2787 |
|
2793 | |||
2788 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() |
|
2794 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() | |
2789 | function (basically a big docstring) and a few more things here to |
|
2795 | function (basically a big docstring) and a few more things here to | |
2790 | speedup startup. pysh.py is now very lightweight. We want because |
|
2796 | speedup startup. pysh.py is now very lightweight. We want because | |
2791 | it gets execfile'd, while InterpreterExec gets imported, so |
|
2797 | it gets execfile'd, while InterpreterExec gets imported, so | |
2792 | byte-compilation saves time. |
|
2798 | byte-compilation saves time. | |
2793 |
|
2799 | |||
2794 | 2004-06-25 Fernando Perez <fperez@colorado.edu> |
|
2800 | 2004-06-25 Fernando Perez <fperez@colorado.edu> | |
2795 |
|
2801 | |||
2796 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd |
|
2802 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd | |
2797 | -NUM', which was recently broken. |
|
2803 | -NUM', which was recently broken. | |
2798 |
|
2804 | |||
2799 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! |
|
2805 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! | |
2800 | in multi-line input (but not !!, which doesn't make sense there). |
|
2806 | in multi-line input (but not !!, which doesn't make sense there). | |
2801 |
|
2807 | |||
2802 | * IPython/UserConfig/ipythonrc: made autoindent on by default. |
|
2808 | * IPython/UserConfig/ipythonrc: made autoindent on by default. | |
2803 | It's just too useful, and people can turn it off in the less |
|
2809 | It's just too useful, and people can turn it off in the less | |
2804 | common cases where it's a problem. |
|
2810 | common cases where it's a problem. | |
2805 |
|
2811 | |||
2806 | 2004-06-24 Fernando Perez <fperez@colorado.edu> |
|
2812 | 2004-06-24 Fernando Perez <fperez@colorado.edu> | |
2807 |
|
2813 | |||
2808 | * IPython/iplib.py (InteractiveShell._prefilter): big change - |
|
2814 | * IPython/iplib.py (InteractiveShell._prefilter): big change - | |
2809 | special syntaxes (like alias calling) is now allied in multi-line |
|
2815 | special syntaxes (like alias calling) is now allied in multi-line | |
2810 | input. This is still _very_ experimental, but it's necessary for |
|
2816 | input. This is still _very_ experimental, but it's necessary for | |
2811 | efficient shell usage combining python looping syntax with system |
|
2817 | efficient shell usage combining python looping syntax with system | |
2812 | calls. For now it's restricted to aliases, I don't think it |
|
2818 | calls. For now it's restricted to aliases, I don't think it | |
2813 | really even makes sense to have this for magics. |
|
2819 | really even makes sense to have this for magics. | |
2814 |
|
2820 | |||
2815 | 2004-06-23 Fernando Perez <fperez@colorado.edu> |
|
2821 | 2004-06-23 Fernando Perez <fperez@colorado.edu> | |
2816 |
|
2822 | |||
2817 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added |
|
2823 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added | |
2818 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. |
|
2824 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. | |
2819 |
|
2825 | |||
2820 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle |
|
2826 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle | |
2821 | extensions under Windows (after code sent by Gary Bishop). The |
|
2827 | extensions under Windows (after code sent by Gary Bishop). The | |
2822 | extensions considered 'executable' are stored in IPython's rc |
|
2828 | extensions considered 'executable' are stored in IPython's rc | |
2823 | structure as win_exec_ext. |
|
2829 | structure as win_exec_ext. | |
2824 |
|
2830 | |||
2825 | * IPython/genutils.py (shell): new function, like system() but |
|
2831 | * IPython/genutils.py (shell): new function, like system() but | |
2826 | without return value. Very useful for interactive shell work. |
|
2832 | without return value. Very useful for interactive shell work. | |
2827 |
|
2833 | |||
2828 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to |
|
2834 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to | |
2829 | delete aliases. |
|
2835 | delete aliases. | |
2830 |
|
2836 | |||
2831 | * IPython/iplib.py (InteractiveShell.alias_table_update): make |
|
2837 | * IPython/iplib.py (InteractiveShell.alias_table_update): make | |
2832 | sure that the alias table doesn't contain python keywords. |
|
2838 | sure that the alias table doesn't contain python keywords. | |
2833 |
|
2839 | |||
2834 | 2004-06-21 Fernando Perez <fperez@colorado.edu> |
|
2840 | 2004-06-21 Fernando Perez <fperez@colorado.edu> | |
2835 |
|
2841 | |||
2836 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when |
|
2842 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when | |
2837 | non-existent items are found in $PATH. Reported by Thorsten. |
|
2843 | non-existent items are found in $PATH. Reported by Thorsten. | |
2838 |
|
2844 | |||
2839 | 2004-06-20 Fernando Perez <fperez@colorado.edu> |
|
2845 | 2004-06-20 Fernando Perez <fperez@colorado.edu> | |
2840 |
|
2846 | |||
2841 | * IPython/iplib.py (complete): modified the completer so that the |
|
2847 | * IPython/iplib.py (complete): modified the completer so that the | |
2842 | order of priorities can be easily changed at runtime. |
|
2848 | order of priorities can be easily changed at runtime. | |
2843 |
|
2849 | |||
2844 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): |
|
2850 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): | |
2845 | Modified to auto-execute all lines beginning with '~', '/' or '.'. |
|
2851 | Modified to auto-execute all lines beginning with '~', '/' or '.'. | |
2846 |
|
2852 | |||
2847 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to |
|
2853 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to | |
2848 | expand Python variables prepended with $ in all system calls. The |
|
2854 | expand Python variables prepended with $ in all system calls. The | |
2849 | same was done to InteractiveShell.handle_shell_escape. Now all |
|
2855 | same was done to InteractiveShell.handle_shell_escape. Now all | |
2850 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the |
|
2856 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the | |
2851 | expansion of python variables and expressions according to the |
|
2857 | expansion of python variables and expressions according to the | |
2852 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. |
|
2858 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. | |
2853 |
|
2859 | |||
2854 | Though PEP-215 has been rejected, a similar (but simpler) one |
|
2860 | Though PEP-215 has been rejected, a similar (but simpler) one | |
2855 | seems like it will go into Python 2.4, PEP-292 - |
|
2861 | seems like it will go into Python 2.4, PEP-292 - | |
2856 | http://www.python.org/peps/pep-0292.html. |
|
2862 | http://www.python.org/peps/pep-0292.html. | |
2857 |
|
2863 | |||
2858 | I'll keep the full syntax of PEP-215, since IPython has since the |
|
2864 | I'll keep the full syntax of PEP-215, since IPython has since the | |
2859 | start used Ka-Ping Yee's reference implementation discussed there |
|
2865 | start used Ka-Ping Yee's reference implementation discussed there | |
2860 | (Itpl), and I actually like the powerful semantics it offers. |
|
2866 | (Itpl), and I actually like the powerful semantics it offers. | |
2861 |
|
2867 | |||
2862 | In order to access normal shell variables, the $ has to be escaped |
|
2868 | In order to access normal shell variables, the $ has to be escaped | |
2863 | via an extra $. For example: |
|
2869 | via an extra $. For example: | |
2864 |
|
2870 | |||
2865 | In [7]: PATH='a python variable' |
|
2871 | In [7]: PATH='a python variable' | |
2866 |
|
2872 | |||
2867 | In [8]: !echo $PATH |
|
2873 | In [8]: !echo $PATH | |
2868 | a python variable |
|
2874 | a python variable | |
2869 |
|
2875 | |||
2870 | In [9]: !echo $$PATH |
|
2876 | In [9]: !echo $$PATH | |
2871 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... |
|
2877 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... | |
2872 |
|
2878 | |||
2873 | (Magic.parse_options): escape $ so the shell doesn't evaluate |
|
2879 | (Magic.parse_options): escape $ so the shell doesn't evaluate | |
2874 | things prematurely. |
|
2880 | things prematurely. | |
2875 |
|
2881 | |||
2876 | * IPython/iplib.py (InteractiveShell.call_alias): added the |
|
2882 | * IPython/iplib.py (InteractiveShell.call_alias): added the | |
2877 | ability for aliases to expand python variables via $. |
|
2883 | ability for aliases to expand python variables via $. | |
2878 |
|
2884 | |||
2879 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias |
|
2885 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias | |
2880 | system, now there's a @rehash/@rehashx pair of magics. These work |
|
2886 | system, now there's a @rehash/@rehashx pair of magics. These work | |
2881 | like the csh rehash command, and can be invoked at any time. They |
|
2887 | like the csh rehash command, and can be invoked at any time. They | |
2882 | build a table of aliases to everything in the user's $PATH |
|
2888 | build a table of aliases to everything in the user's $PATH | |
2883 | (@rehash uses everything, @rehashx is slower but only adds |
|
2889 | (@rehash uses everything, @rehashx is slower but only adds | |
2884 | executable files). With this, the pysh.py-based shell profile can |
|
2890 | executable files). With this, the pysh.py-based shell profile can | |
2885 | now simply call rehash upon startup, and full access to all |
|
2891 | now simply call rehash upon startup, and full access to all | |
2886 | programs in the user's path is obtained. |
|
2892 | programs in the user's path is obtained. | |
2887 |
|
2893 | |||
2888 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias |
|
2894 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias | |
2889 | functionality is now fully in place. I removed the old dynamic |
|
2895 | functionality is now fully in place. I removed the old dynamic | |
2890 | code generation based approach, in favor of a much lighter one |
|
2896 | code generation based approach, in favor of a much lighter one | |
2891 | based on a simple dict. The advantage is that this allows me to |
|
2897 | based on a simple dict. The advantage is that this allows me to | |
2892 | now have thousands of aliases with negligible cost (unthinkable |
|
2898 | now have thousands of aliases with negligible cost (unthinkable | |
2893 | with the old system). |
|
2899 | with the old system). | |
2894 |
|
2900 | |||
2895 | 2004-06-19 Fernando Perez <fperez@colorado.edu> |
|
2901 | 2004-06-19 Fernando Perez <fperez@colorado.edu> | |
2896 |
|
2902 | |||
2897 | * IPython/iplib.py (__init__): extended MagicCompleter class to |
|
2903 | * IPython/iplib.py (__init__): extended MagicCompleter class to | |
2898 | also complete (last in priority) on user aliases. |
|
2904 | also complete (last in priority) on user aliases. | |
2899 |
|
2905 | |||
2900 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in |
|
2906 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in | |
2901 | call to eval. |
|
2907 | call to eval. | |
2902 | (ItplNS.__init__): Added a new class which functions like Itpl, |
|
2908 | (ItplNS.__init__): Added a new class which functions like Itpl, | |
2903 | but allows configuring the namespace for the evaluation to occur |
|
2909 | but allows configuring the namespace for the evaluation to occur | |
2904 | in. |
|
2910 | in. | |
2905 |
|
2911 | |||
2906 | 2004-06-18 Fernando Perez <fperez@colorado.edu> |
|
2912 | 2004-06-18 Fernando Perez <fperez@colorado.edu> | |
2907 |
|
2913 | |||
2908 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a |
|
2914 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a | |
2909 | better message when 'exit' or 'quit' are typed (a common newbie |
|
2915 | better message when 'exit' or 'quit' are typed (a common newbie | |
2910 | confusion). |
|
2916 | confusion). | |
2911 |
|
2917 | |||
2912 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color |
|
2918 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color | |
2913 | check for Windows users. |
|
2919 | check for Windows users. | |
2914 |
|
2920 | |||
2915 | * IPython/iplib.py (InteractiveShell.user_setup): removed |
|
2921 | * IPython/iplib.py (InteractiveShell.user_setup): removed | |
2916 | disabling of colors for Windows. I'll test at runtime and issue a |
|
2922 | disabling of colors for Windows. I'll test at runtime and issue a | |
2917 | warning if Gary's readline isn't found, as to nudge users to |
|
2923 | warning if Gary's readline isn't found, as to nudge users to | |
2918 | download it. |
|
2924 | download it. | |
2919 |
|
2925 | |||
2920 | 2004-06-16 Fernando Perez <fperez@colorado.edu> |
|
2926 | 2004-06-16 Fernando Perez <fperez@colorado.edu> | |
2921 |
|
2927 | |||
2922 | * IPython/genutils.py (Stream.__init__): changed to print errors |
|
2928 | * IPython/genutils.py (Stream.__init__): changed to print errors | |
2923 | to sys.stderr. I had a circular dependency here. Now it's |
|
2929 | to sys.stderr. I had a circular dependency here. Now it's | |
2924 | possible to run ipython as IDLE's shell (consider this pre-alpha, |
|
2930 | possible to run ipython as IDLE's shell (consider this pre-alpha, | |
2925 | since true stdout things end up in the starting terminal instead |
|
2931 | since true stdout things end up in the starting terminal instead | |
2926 | of IDLE's out). |
|
2932 | of IDLE's out). | |
2927 |
|
2933 | |||
2928 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for |
|
2934 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for | |
2929 | users who haven't # updated their prompt_in2 definitions. Remove |
|
2935 | users who haven't # updated their prompt_in2 definitions. Remove | |
2930 | eventually. |
|
2936 | eventually. | |
2931 | (multiple_replace): added credit to original ASPN recipe. |
|
2937 | (multiple_replace): added credit to original ASPN recipe. | |
2932 |
|
2938 | |||
2933 | 2004-06-15 Fernando Perez <fperez@colorado.edu> |
|
2939 | 2004-06-15 Fernando Perez <fperez@colorado.edu> | |
2934 |
|
2940 | |||
2935 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the |
|
2941 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the | |
2936 | list of auto-defined aliases. |
|
2942 | list of auto-defined aliases. | |
2937 |
|
2943 | |||
2938 | 2004-06-13 Fernando Perez <fperez@colorado.edu> |
|
2944 | 2004-06-13 Fernando Perez <fperez@colorado.edu> | |
2939 |
|
2945 | |||
2940 | * setup.py (scriptfiles): Don't trigger win_post_install unless an |
|
2946 | * setup.py (scriptfiles): Don't trigger win_post_install unless an | |
2941 | install was really requested (so setup.py can be used for other |
|
2947 | install was really requested (so setup.py can be used for other | |
2942 | things under Windows). |
|
2948 | things under Windows). | |
2943 |
|
2949 | |||
2944 | 2004-06-10 Fernando Perez <fperez@colorado.edu> |
|
2950 | 2004-06-10 Fernando Perez <fperez@colorado.edu> | |
2945 |
|
2951 | |||
2946 | * IPython/Logger.py (Logger.create_log): Manually remove any old |
|
2952 | * IPython/Logger.py (Logger.create_log): Manually remove any old | |
2947 | backup, since os.remove may fail under Windows. Fixes bug |
|
2953 | backup, since os.remove may fail under Windows. Fixes bug | |
2948 | reported by Thorsten. |
|
2954 | reported by Thorsten. | |
2949 |
|
2955 | |||
2950 | 2004-06-09 Fernando Perez <fperez@colorado.edu> |
|
2956 | 2004-06-09 Fernando Perez <fperez@colorado.edu> | |
2951 |
|
2957 | |||
2952 | * examples/example-embed.py: fixed all references to %n (replaced |
|
2958 | * examples/example-embed.py: fixed all references to %n (replaced | |
2953 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done |
|
2959 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done | |
2954 | for all examples and the manual as well. |
|
2960 | for all examples and the manual as well. | |
2955 |
|
2961 | |||
2956 | 2004-06-08 Fernando Perez <fperez@colorado.edu> |
|
2962 | 2004-06-08 Fernando Perez <fperez@colorado.edu> | |
2957 |
|
2963 | |||
2958 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt |
|
2964 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt | |
2959 | alignment and color management. All 3 prompt subsystems now |
|
2965 | alignment and color management. All 3 prompt subsystems now | |
2960 | inherit from BasePrompt. |
|
2966 | inherit from BasePrompt. | |
2961 |
|
2967 | |||
2962 | * tools/release: updates for windows installer build and tag rpms |
|
2968 | * tools/release: updates for windows installer build and tag rpms | |
2963 | with python version (since paths are fixed). |
|
2969 | with python version (since paths are fixed). | |
2964 |
|
2970 | |||
2965 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, |
|
2971 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, | |
2966 | which will become eventually obsolete. Also fixed the default |
|
2972 | which will become eventually obsolete. Also fixed the default | |
2967 | prompt_in2 to use \D, so at least new users start with the correct |
|
2973 | prompt_in2 to use \D, so at least new users start with the correct | |
2968 | defaults. |
|
2974 | defaults. | |
2969 | WARNING: Users with existing ipythonrc files will need to apply |
|
2975 | WARNING: Users with existing ipythonrc files will need to apply | |
2970 | this fix manually! |
|
2976 | this fix manually! | |
2971 |
|
2977 | |||
2972 | * setup.py: make windows installer (.exe). This is finally the |
|
2978 | * setup.py: make windows installer (.exe). This is finally the | |
2973 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, |
|
2979 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, | |
2974 | which I hadn't included because it required Python 2.3 (or recent |
|
2980 | which I hadn't included because it required Python 2.3 (or recent | |
2975 | distutils). |
|
2981 | distutils). | |
2976 |
|
2982 | |||
2977 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect |
|
2983 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect | |
2978 | usage of new '\D' escape. |
|
2984 | usage of new '\D' escape. | |
2979 |
|
2985 | |||
2980 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which |
|
2986 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which | |
2981 | lacks os.getuid()) |
|
2987 | lacks os.getuid()) | |
2982 | (CachedOutput.set_colors): Added the ability to turn coloring |
|
2988 | (CachedOutput.set_colors): Added the ability to turn coloring | |
2983 | on/off with @colors even for manually defined prompt colors. It |
|
2989 | on/off with @colors even for manually defined prompt colors. It | |
2984 | uses a nasty global, but it works safely and via the generic color |
|
2990 | uses a nasty global, but it works safely and via the generic color | |
2985 | handling mechanism. |
|
2991 | handling mechanism. | |
2986 | (Prompt2.__init__): Introduced new escape '\D' for continuation |
|
2992 | (Prompt2.__init__): Introduced new escape '\D' for continuation | |
2987 | prompts. It represents the counter ('\#') as dots. |
|
2993 | prompts. It represents the counter ('\#') as dots. | |
2988 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will |
|
2994 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will | |
2989 | need to update their ipythonrc files and replace '%n' with '\D' in |
|
2995 | need to update their ipythonrc files and replace '%n' with '\D' in | |
2990 | their prompt_in2 settings everywhere. Sorry, but there's |
|
2996 | their prompt_in2 settings everywhere. Sorry, but there's | |
2991 | otherwise no clean way to get all prompts to properly align. The |
|
2997 | otherwise no clean way to get all prompts to properly align. The | |
2992 | ipythonrc shipped with IPython has been updated. |
|
2998 | ipythonrc shipped with IPython has been updated. | |
2993 |
|
2999 | |||
2994 | 2004-06-07 Fernando Perez <fperez@colorado.edu> |
|
3000 | 2004-06-07 Fernando Perez <fperez@colorado.edu> | |
2995 |
|
3001 | |||
2996 | * setup.py (isfile): Pass local_icons option to latex2html, so the |
|
3002 | * setup.py (isfile): Pass local_icons option to latex2html, so the | |
2997 | resulting HTML file is self-contained. Thanks to |
|
3003 | resulting HTML file is self-contained. Thanks to | |
2998 | dryice-AT-liu.com.cn for the tip. |
|
3004 | dryice-AT-liu.com.cn for the tip. | |
2999 |
|
3005 | |||
3000 | * pysh.py: I created a new profile 'shell', which implements a |
|
3006 | * pysh.py: I created a new profile 'shell', which implements a | |
3001 | _rudimentary_ IPython-based shell. This is in NO WAY a realy |
|
3007 | _rudimentary_ IPython-based shell. This is in NO WAY a realy | |
3002 | system shell, nor will it become one anytime soon. It's mainly |
|
3008 | system shell, nor will it become one anytime soon. It's mainly | |
3003 | meant to illustrate the use of the new flexible bash-like prompts. |
|
3009 | meant to illustrate the use of the new flexible bash-like prompts. | |
3004 | I guess it could be used by hardy souls for true shell management, |
|
3010 | I guess it could be used by hardy souls for true shell management, | |
3005 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' |
|
3011 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' | |
3006 | profile. This uses the InterpreterExec extension provided by |
|
3012 | profile. This uses the InterpreterExec extension provided by | |
3007 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> |
|
3013 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> | |
3008 |
|
3014 | |||
3009 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly |
|
3015 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly | |
3010 | auto-align itself with the length of the previous input prompt |
|
3016 | auto-align itself with the length of the previous input prompt | |
3011 | (taking into account the invisible color escapes). |
|
3017 | (taking into account the invisible color escapes). | |
3012 | (CachedOutput.__init__): Large restructuring of this class. Now |
|
3018 | (CachedOutput.__init__): Large restructuring of this class. Now | |
3013 | all three prompts (primary1, primary2, output) are proper objects, |
|
3019 | all three prompts (primary1, primary2, output) are proper objects, | |
3014 | managed by the 'parent' CachedOutput class. The code is still a |
|
3020 | managed by the 'parent' CachedOutput class. The code is still a | |
3015 | bit hackish (all prompts share state via a pointer to the cache), |
|
3021 | bit hackish (all prompts share state via a pointer to the cache), | |
3016 | but it's overall far cleaner than before. |
|
3022 | but it's overall far cleaner than before. | |
3017 |
|
3023 | |||
3018 | * IPython/genutils.py (getoutputerror): modified to add verbose, |
|
3024 | * IPython/genutils.py (getoutputerror): modified to add verbose, | |
3019 | debug and header options. This makes the interface of all getout* |
|
3025 | debug and header options. This makes the interface of all getout* | |
3020 | functions uniform. |
|
3026 | functions uniform. | |
3021 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. |
|
3027 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. | |
3022 |
|
3028 | |||
3023 | * IPython/Magic.py (Magic.default_option): added a function to |
|
3029 | * IPython/Magic.py (Magic.default_option): added a function to | |
3024 | allow registering default options for any magic command. This |
|
3030 | allow registering default options for any magic command. This | |
3025 | makes it easy to have profiles which customize the magics globally |
|
3031 | makes it easy to have profiles which customize the magics globally | |
3026 | for a certain use. The values set through this function are |
|
3032 | for a certain use. The values set through this function are | |
3027 | picked up by the parse_options() method, which all magics should |
|
3033 | picked up by the parse_options() method, which all magics should | |
3028 | use to parse their options. |
|
3034 | use to parse their options. | |
3029 |
|
3035 | |||
3030 | * IPython/genutils.py (warn): modified the warnings framework to |
|
3036 | * IPython/genutils.py (warn): modified the warnings framework to | |
3031 | use the Term I/O class. I'm trying to slowly unify all of |
|
3037 | use the Term I/O class. I'm trying to slowly unify all of | |
3032 | IPython's I/O operations to pass through Term. |
|
3038 | IPython's I/O operations to pass through Term. | |
3033 |
|
3039 | |||
3034 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in |
|
3040 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in | |
3035 | the secondary prompt to correctly match the length of the primary |
|
3041 | the secondary prompt to correctly match the length of the primary | |
3036 | one for any prompt. Now multi-line code will properly line up |
|
3042 | one for any prompt. Now multi-line code will properly line up | |
3037 | even for path dependent prompts, such as the new ones available |
|
3043 | even for path dependent prompts, such as the new ones available | |
3038 | via the prompt_specials. |
|
3044 | via the prompt_specials. | |
3039 |
|
3045 | |||
3040 | 2004-06-06 Fernando Perez <fperez@colorado.edu> |
|
3046 | 2004-06-06 Fernando Perez <fperez@colorado.edu> | |
3041 |
|
3047 | |||
3042 | * IPython/Prompts.py (prompt_specials): Added the ability to have |
|
3048 | * IPython/Prompts.py (prompt_specials): Added the ability to have | |
3043 | bash-like special sequences in the prompts, which get |
|
3049 | bash-like special sequences in the prompts, which get | |
3044 | automatically expanded. Things like hostname, current working |
|
3050 | automatically expanded. Things like hostname, current working | |
3045 | directory and username are implemented already, but it's easy to |
|
3051 | directory and username are implemented already, but it's easy to | |
3046 | add more in the future. Thanks to a patch by W.J. van der Laan |
|
3052 | add more in the future. Thanks to a patch by W.J. van der Laan | |
3047 | <gnufnork-AT-hetdigitalegat.nl> |
|
3053 | <gnufnork-AT-hetdigitalegat.nl> | |
3048 | (prompt_specials): Added color support for prompt strings, so |
|
3054 | (prompt_specials): Added color support for prompt strings, so | |
3049 | users can define arbitrary color setups for their prompts. |
|
3055 | users can define arbitrary color setups for their prompts. | |
3050 |
|
3056 | |||
3051 | 2004-06-05 Fernando Perez <fperez@colorado.edu> |
|
3057 | 2004-06-05 Fernando Perez <fperez@colorado.edu> | |
3052 |
|
3058 | |||
3053 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific |
|
3059 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific | |
3054 | code to load Gary Bishop's readline and configure it |
|
3060 | code to load Gary Bishop's readline and configure it | |
3055 | automatically. Thanks to Gary for help on this. |
|
3061 | automatically. Thanks to Gary for help on this. | |
3056 |
|
3062 | |||
3057 | 2004-06-01 Fernando Perez <fperez@colorado.edu> |
|
3063 | 2004-06-01 Fernando Perez <fperez@colorado.edu> | |
3058 |
|
3064 | |||
3059 | * IPython/Logger.py (Logger.create_log): fix bug for logging |
|
3065 | * IPython/Logger.py (Logger.create_log): fix bug for logging | |
3060 | with no filename (previous fix was incomplete). |
|
3066 | with no filename (previous fix was incomplete). | |
3061 |
|
3067 | |||
3062 | 2004-05-25 Fernando Perez <fperez@colorado.edu> |
|
3068 | 2004-05-25 Fernando Perez <fperez@colorado.edu> | |
3063 |
|
3069 | |||
3064 | * IPython/Magic.py (Magic.parse_options): fix bug where naked |
|
3070 | * IPython/Magic.py (Magic.parse_options): fix bug where naked | |
3065 | parens would get passed to the shell. |
|
3071 | parens would get passed to the shell. | |
3066 |
|
3072 | |||
3067 | 2004-05-20 Fernando Perez <fperez@colorado.edu> |
|
3073 | 2004-05-20 Fernando Perez <fperez@colorado.edu> | |
3068 |
|
3074 | |||
3069 | * IPython/Magic.py (Magic.magic_prun): changed default profile |
|
3075 | * IPython/Magic.py (Magic.magic_prun): changed default profile | |
3070 | sort order to 'time' (the more common profiling need). |
|
3076 | sort order to 'time' (the more common profiling need). | |
3071 |
|
3077 | |||
3072 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache |
|
3078 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache | |
3073 | so that source code shown is guaranteed in sync with the file on |
|
3079 | so that source code shown is guaranteed in sync with the file on | |
3074 | disk (also changed in psource). Similar fix to the one for |
|
3080 | disk (also changed in psource). Similar fix to the one for | |
3075 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du |
|
3081 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du | |
3076 | <yann.ledu-AT-noos.fr>. |
|
3082 | <yann.ledu-AT-noos.fr>. | |
3077 |
|
3083 | |||
3078 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands |
|
3084 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands | |
3079 | with a single option would not be correctly parsed. Closes |
|
3085 | with a single option would not be correctly parsed. Closes | |
3080 | http://www.scipy.net/roundup/ipython/issue14. This bug had been |
|
3086 | http://www.scipy.net/roundup/ipython/issue14. This bug had been | |
3081 | introduced in 0.6.0 (on 2004-05-06). |
|
3087 | introduced in 0.6.0 (on 2004-05-06). | |
3082 |
|
3088 | |||
3083 | 2004-05-13 *** Released version 0.6.0 |
|
3089 | 2004-05-13 *** Released version 0.6.0 | |
3084 |
|
3090 | |||
3085 | 2004-05-13 Fernando Perez <fperez@colorado.edu> |
|
3091 | 2004-05-13 Fernando Perez <fperez@colorado.edu> | |
3086 |
|
3092 | |||
3087 | * debian/: Added debian/ directory to CVS, so that debian support |
|
3093 | * debian/: Added debian/ directory to CVS, so that debian support | |
3088 | is publicly accessible. The debian package is maintained by Jack |
|
3094 | is publicly accessible. The debian package is maintained by Jack | |
3089 | Moffit <jack-AT-xiph.org>. |
|
3095 | Moffit <jack-AT-xiph.org>. | |
3090 |
|
3096 | |||
3091 | * Documentation: included the notes about an ipython-based system |
|
3097 | * Documentation: included the notes about an ipython-based system | |
3092 | shell (the hypothetical 'pysh') into the new_design.pdf document, |
|
3098 | shell (the hypothetical 'pysh') into the new_design.pdf document, | |
3093 | so that these ideas get distributed to users along with the |
|
3099 | so that these ideas get distributed to users along with the | |
3094 | official documentation. |
|
3100 | official documentation. | |
3095 |
|
3101 | |||
3096 | 2004-05-10 Fernando Perez <fperez@colorado.edu> |
|
3102 | 2004-05-10 Fernando Perez <fperez@colorado.edu> | |
3097 |
|
3103 | |||
3098 | * IPython/Logger.py (Logger.create_log): fix recently introduced |
|
3104 | * IPython/Logger.py (Logger.create_log): fix recently introduced | |
3099 | bug (misindented line) where logstart would fail when not given an |
|
3105 | bug (misindented line) where logstart would fail when not given an | |
3100 | explicit filename. |
|
3106 | explicit filename. | |
3101 |
|
3107 | |||
3102 | 2004-05-09 Fernando Perez <fperez@colorado.edu> |
|
3108 | 2004-05-09 Fernando Perez <fperez@colorado.edu> | |
3103 |
|
3109 | |||
3104 | * IPython/Magic.py (Magic.parse_options): skip system call when |
|
3110 | * IPython/Magic.py (Magic.parse_options): skip system call when | |
3105 | there are no options to look for. Faster, cleaner for the common |
|
3111 | there are no options to look for. Faster, cleaner for the common | |
3106 | case. |
|
3112 | case. | |
3107 |
|
3113 | |||
3108 | * Documentation: many updates to the manual: describing Windows |
|
3114 | * Documentation: many updates to the manual: describing Windows | |
3109 | support better, Gnuplot updates, credits, misc small stuff. Also |
|
3115 | support better, Gnuplot updates, credits, misc small stuff. Also | |
3110 | updated the new_design doc a bit. |
|
3116 | updated the new_design doc a bit. | |
3111 |
|
3117 | |||
3112 | 2004-05-06 *** Released version 0.6.0.rc1 |
|
3118 | 2004-05-06 *** Released version 0.6.0.rc1 | |
3113 |
|
3119 | |||
3114 | 2004-05-06 Fernando Perez <fperez@colorado.edu> |
|
3120 | 2004-05-06 Fernando Perez <fperez@colorado.edu> | |
3115 |
|
3121 | |||
3116 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += |
|
3122 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += | |
3117 | operations to use the vastly more efficient list/''.join() method. |
|
3123 | operations to use the vastly more efficient list/''.join() method. | |
3118 | (FormattedTB.text): Fix |
|
3124 | (FormattedTB.text): Fix | |
3119 | http://www.scipy.net/roundup/ipython/issue12 - exception source |
|
3125 | http://www.scipy.net/roundup/ipython/issue12 - exception source | |
3120 | extract not updated after reload. Thanks to Mike Salib |
|
3126 | extract not updated after reload. Thanks to Mike Salib | |
3121 | <msalib-AT-mit.edu> for pinning the source of the problem. |
|
3127 | <msalib-AT-mit.edu> for pinning the source of the problem. | |
3122 | Fortunately, the solution works inside ipython and doesn't require |
|
3128 | Fortunately, the solution works inside ipython and doesn't require | |
3123 | any changes to python proper. |
|
3129 | any changes to python proper. | |
3124 |
|
3130 | |||
3125 | * IPython/Magic.py (Magic.parse_options): Improved to process the |
|
3131 | * IPython/Magic.py (Magic.parse_options): Improved to process the | |
3126 | argument list as a true shell would (by actually using the |
|
3132 | argument list as a true shell would (by actually using the | |
3127 | underlying system shell). This way, all @magics automatically get |
|
3133 | underlying system shell). This way, all @magics automatically get | |
3128 | shell expansion for variables. Thanks to a comment by Alex |
|
3134 | shell expansion for variables. Thanks to a comment by Alex | |
3129 | Schmolck. |
|
3135 | Schmolck. | |
3130 |
|
3136 | |||
3131 | 2004-04-04 Fernando Perez <fperez@colorado.edu> |
|
3137 | 2004-04-04 Fernando Perez <fperez@colorado.edu> | |
3132 |
|
3138 | |||
3133 | * IPython/iplib.py (InteractiveShell.interact): Added a special |
|
3139 | * IPython/iplib.py (InteractiveShell.interact): Added a special | |
3134 | trap for a debugger quit exception, which is basically impossible |
|
3140 | trap for a debugger quit exception, which is basically impossible | |
3135 | to handle by normal mechanisms, given what pdb does to the stack. |
|
3141 | to handle by normal mechanisms, given what pdb does to the stack. | |
3136 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. |
|
3142 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. | |
3137 |
|
3143 | |||
3138 | 2004-04-03 Fernando Perez <fperez@colorado.edu> |
|
3144 | 2004-04-03 Fernando Perez <fperez@colorado.edu> | |
3139 |
|
3145 | |||
3140 | * IPython/genutils.py (Term): Standardized the names of the Term |
|
3146 | * IPython/genutils.py (Term): Standardized the names of the Term | |
3141 | class streams to cin/cout/cerr, following C++ naming conventions |
|
3147 | class streams to cin/cout/cerr, following C++ naming conventions | |
3142 | (I can't use in/out/err because 'in' is not a valid attribute |
|
3148 | (I can't use in/out/err because 'in' is not a valid attribute | |
3143 | name). |
|
3149 | name). | |
3144 |
|
3150 | |||
3145 | * IPython/iplib.py (InteractiveShell.interact): don't increment |
|
3151 | * IPython/iplib.py (InteractiveShell.interact): don't increment | |
3146 | the prompt if there's no user input. By Daniel 'Dang' Griffith |
|
3152 | the prompt if there's no user input. By Daniel 'Dang' Griffith | |
3147 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from |
|
3153 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from | |
3148 | Francois Pinard. |
|
3154 | Francois Pinard. | |
3149 |
|
3155 | |||
3150 | 2004-04-02 Fernando Perez <fperez@colorado.edu> |
|
3156 | 2004-04-02 Fernando Perez <fperez@colorado.edu> | |
3151 |
|
3157 | |||
3152 | * IPython/genutils.py (Stream.__init__): Modified to survive at |
|
3158 | * IPython/genutils.py (Stream.__init__): Modified to survive at | |
3153 | least importing in contexts where stdin/out/err aren't true file |
|
3159 | least importing in contexts where stdin/out/err aren't true file | |
3154 | objects, such as PyCrust (they lack fileno() and mode). However, |
|
3160 | objects, such as PyCrust (they lack fileno() and mode). However, | |
3155 | the recovery facilities which rely on these things existing will |
|
3161 | the recovery facilities which rely on these things existing will | |
3156 | not work. |
|
3162 | not work. | |
3157 |
|
3163 | |||
3158 | 2004-04-01 Fernando Perez <fperez@colorado.edu> |
|
3164 | 2004-04-01 Fernando Perez <fperez@colorado.edu> | |
3159 |
|
3165 | |||
3160 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to |
|
3166 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to | |
3161 | use the new getoutputerror() function, so it properly |
|
3167 | use the new getoutputerror() function, so it properly | |
3162 | distinguishes stdout/err. |
|
3168 | distinguishes stdout/err. | |
3163 |
|
3169 | |||
3164 | * IPython/genutils.py (getoutputerror): added a function to |
|
3170 | * IPython/genutils.py (getoutputerror): added a function to | |
3165 | capture separately the standard output and error of a command. |
|
3171 | capture separately the standard output and error of a command. | |
3166 | After a comment from dang on the mailing lists. This code is |
|
3172 | After a comment from dang on the mailing lists. This code is | |
3167 | basically a modified version of commands.getstatusoutput(), from |
|
3173 | basically a modified version of commands.getstatusoutput(), from | |
3168 | the standard library. |
|
3174 | the standard library. | |
3169 |
|
3175 | |||
3170 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added |
|
3176 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added | |
3171 | '!!' as a special syntax (shorthand) to access @sx. |
|
3177 | '!!' as a special syntax (shorthand) to access @sx. | |
3172 |
|
3178 | |||
3173 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell |
|
3179 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell | |
3174 | command and return its output as a list split on '\n'. |
|
3180 | command and return its output as a list split on '\n'. | |
3175 |
|
3181 | |||
3176 | 2004-03-31 Fernando Perez <fperez@colorado.edu> |
|
3182 | 2004-03-31 Fernando Perez <fperez@colorado.edu> | |
3177 |
|
3183 | |||
3178 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ |
|
3184 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ | |
3179 | method to dictionaries used as FakeModule instances if they lack |
|
3185 | method to dictionaries used as FakeModule instances if they lack | |
3180 | it. At least pydoc in python2.3 breaks for runtime-defined |
|
3186 | it. At least pydoc in python2.3 breaks for runtime-defined | |
3181 | functions without this hack. At some point I need to _really_ |
|
3187 | functions without this hack. At some point I need to _really_ | |
3182 | understand what FakeModule is doing, because it's a gross hack. |
|
3188 | understand what FakeModule is doing, because it's a gross hack. | |
3183 | But it solves Arnd's problem for now... |
|
3189 | But it solves Arnd's problem for now... | |
3184 |
|
3190 | |||
3185 | 2004-02-27 Fernando Perez <fperez@colorado.edu> |
|
3191 | 2004-02-27 Fernando Perez <fperez@colorado.edu> | |
3186 |
|
3192 | |||
3187 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' |
|
3193 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' | |
3188 | mode would behave erratically. Also increased the number of |
|
3194 | mode would behave erratically. Also increased the number of | |
3189 | possible logs in rotate mod to 999. Thanks to Rod Holland |
|
3195 | possible logs in rotate mod to 999. Thanks to Rod Holland | |
3190 | <rhh@StructureLABS.com> for the report and fixes. |
|
3196 | <rhh@StructureLABS.com> for the report and fixes. | |
3191 |
|
3197 | |||
3192 | 2004-02-26 Fernando Perez <fperez@colorado.edu> |
|
3198 | 2004-02-26 Fernando Perez <fperez@colorado.edu> | |
3193 |
|
3199 | |||
3194 | * IPython/genutils.py (page): Check that the curses module really |
|
3200 | * IPython/genutils.py (page): Check that the curses module really | |
3195 | has the initscr attribute before trying to use it. For some |
|
3201 | has the initscr attribute before trying to use it. For some | |
3196 | reason, the Solaris curses module is missing this. I think this |
|
3202 | reason, the Solaris curses module is missing this. I think this | |
3197 | should be considered a Solaris python bug, but I'm not sure. |
|
3203 | should be considered a Solaris python bug, but I'm not sure. | |
3198 |
|
3204 | |||
3199 | 2004-01-17 Fernando Perez <fperez@colorado.edu> |
|
3205 | 2004-01-17 Fernando Perez <fperez@colorado.edu> | |
3200 |
|
3206 | |||
3201 | * IPython/genutils.py (Stream.__init__): Changes to try to make |
|
3207 | * IPython/genutils.py (Stream.__init__): Changes to try to make | |
3202 | ipython robust against stdin/out/err being closed by the user. |
|
3208 | ipython robust against stdin/out/err being closed by the user. | |
3203 | This is 'user error' (and blocks a normal python session, at least |
|
3209 | This is 'user error' (and blocks a normal python session, at least | |
3204 | the stdout case). However, Ipython should be able to survive such |
|
3210 | the stdout case). However, Ipython should be able to survive such | |
3205 | instances of abuse as gracefully as possible. To simplify the |
|
3211 | instances of abuse as gracefully as possible. To simplify the | |
3206 | coding and maintain compatibility with Gary Bishop's Term |
|
3212 | coding and maintain compatibility with Gary Bishop's Term | |
3207 | contributions, I've made use of classmethods for this. I think |
|
3213 | contributions, I've made use of classmethods for this. I think | |
3208 | this introduces a dependency on python 2.2. |
|
3214 | this introduces a dependency on python 2.2. | |
3209 |
|
3215 | |||
3210 | 2004-01-13 Fernando Perez <fperez@colorado.edu> |
|
3216 | 2004-01-13 Fernando Perez <fperez@colorado.edu> | |
3211 |
|
3217 | |||
3212 | * IPython/numutils.py (exp_safe): simplified the code a bit and |
|
3218 | * IPython/numutils.py (exp_safe): simplified the code a bit and | |
3213 | removed the need for importing the kinds module altogether. |
|
3219 | removed the need for importing the kinds module altogether. | |
3214 |
|
3220 | |||
3215 | 2004-01-06 Fernando Perez <fperez@colorado.edu> |
|
3221 | 2004-01-06 Fernando Perez <fperez@colorado.edu> | |
3216 |
|
3222 | |||
3217 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system |
|
3223 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system | |
3218 | a magic function instead, after some community feedback. No |
|
3224 | a magic function instead, after some community feedback. No | |
3219 | special syntax will exist for it, but its name is deliberately |
|
3225 | special syntax will exist for it, but its name is deliberately | |
3220 | very short. |
|
3226 | very short. | |
3221 |
|
3227 | |||
3222 | 2003-12-20 Fernando Perez <fperez@colorado.edu> |
|
3228 | 2003-12-20 Fernando Perez <fperez@colorado.edu> | |
3223 |
|
3229 | |||
3224 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added |
|
3230 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added | |
3225 | new functionality, to automagically assign the result of a shell |
|
3231 | new functionality, to automagically assign the result of a shell | |
3226 | command to a variable. I'll solicit some community feedback on |
|
3232 | command to a variable. I'll solicit some community feedback on | |
3227 | this before making it permanent. |
|
3233 | this before making it permanent. | |
3228 |
|
3234 | |||
3229 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was |
|
3235 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was | |
3230 | requested about callables for which inspect couldn't obtain a |
|
3236 | requested about callables for which inspect couldn't obtain a | |
3231 | proper argspec. Thanks to a crash report sent by Etienne |
|
3237 | proper argspec. Thanks to a crash report sent by Etienne | |
3232 | Posthumus <etienne-AT-apple01.cs.vu.nl>. |
|
3238 | Posthumus <etienne-AT-apple01.cs.vu.nl>. | |
3233 |
|
3239 | |||
3234 | 2003-12-09 Fernando Perez <fperez@colorado.edu> |
|
3240 | 2003-12-09 Fernando Perez <fperez@colorado.edu> | |
3235 |
|
3241 | |||
3236 | * IPython/genutils.py (page): patch for the pager to work across |
|
3242 | * IPython/genutils.py (page): patch for the pager to work across | |
3237 | various versions of Windows. By Gary Bishop. |
|
3243 | various versions of Windows. By Gary Bishop. | |
3238 |
|
3244 | |||
3239 | 2003-12-04 Fernando Perez <fperez@colorado.edu> |
|
3245 | 2003-12-04 Fernando Perez <fperez@colorado.edu> | |
3240 |
|
3246 | |||
3241 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with |
|
3247 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with | |
3242 | Gnuplot.py version 1.7, whose internal names changed quite a bit. |
|
3248 | Gnuplot.py version 1.7, whose internal names changed quite a bit. | |
3243 | While I tested this and it looks ok, there may still be corner |
|
3249 | While I tested this and it looks ok, there may still be corner | |
3244 | cases I've missed. |
|
3250 | cases I've missed. | |
3245 |
|
3251 | |||
3246 | 2003-12-01 Fernando Perez <fperez@colorado.edu> |
|
3252 | 2003-12-01 Fernando Perez <fperez@colorado.edu> | |
3247 |
|
3253 | |||
3248 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug |
|
3254 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug | |
3249 | where a line like 'p,q=1,2' would fail because the automagic |
|
3255 | where a line like 'p,q=1,2' would fail because the automagic | |
3250 | system would be triggered for @p. |
|
3256 | system would be triggered for @p. | |
3251 |
|
3257 | |||
3252 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related |
|
3258 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related | |
3253 | cleanups, code unmodified. |
|
3259 | cleanups, code unmodified. | |
3254 |
|
3260 | |||
3255 | * IPython/genutils.py (Term): added a class for IPython to handle |
|
3261 | * IPython/genutils.py (Term): added a class for IPython to handle | |
3256 | output. In most cases it will just be a proxy for stdout/err, but |
|
3262 | output. In most cases it will just be a proxy for stdout/err, but | |
3257 | having this allows modifications to be made for some platforms, |
|
3263 | having this allows modifications to be made for some platforms, | |
3258 | such as handling color escapes under Windows. All of this code |
|
3264 | such as handling color escapes under Windows. All of this code | |
3259 | was contributed by Gary Bishop, with minor modifications by me. |
|
3265 | was contributed by Gary Bishop, with minor modifications by me. | |
3260 | The actual changes affect many files. |
|
3266 | The actual changes affect many files. | |
3261 |
|
3267 | |||
3262 | 2003-11-30 Fernando Perez <fperez@colorado.edu> |
|
3268 | 2003-11-30 Fernando Perez <fperez@colorado.edu> | |
3263 |
|
3269 | |||
3264 | * IPython/iplib.py (file_matches): new completion code, courtesy |
|
3270 | * IPython/iplib.py (file_matches): new completion code, courtesy | |
3265 | of Jeff Collins. This enables filename completion again under |
|
3271 | of Jeff Collins. This enables filename completion again under | |
3266 | python 2.3, which disabled it at the C level. |
|
3272 | python 2.3, which disabled it at the C level. | |
3267 |
|
3273 | |||
3268 | 2003-11-11 Fernando Perez <fperez@colorado.edu> |
|
3274 | 2003-11-11 Fernando Perez <fperez@colorado.edu> | |
3269 |
|
3275 | |||
3270 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand |
|
3276 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand | |
3271 | for Numeric.array(map(...)), but often convenient. |
|
3277 | for Numeric.array(map(...)), but often convenient. | |
3272 |
|
3278 | |||
3273 | 2003-11-05 Fernando Perez <fperez@colorado.edu> |
|
3279 | 2003-11-05 Fernando Perez <fperez@colorado.edu> | |
3274 |
|
3280 | |||
3275 | * IPython/numutils.py (frange): Changed a call from int() to |
|
3281 | * IPython/numutils.py (frange): Changed a call from int() to | |
3276 | int(round()) to prevent a problem reported with arange() in the |
|
3282 | int(round()) to prevent a problem reported with arange() in the | |
3277 | numpy list. |
|
3283 | numpy list. | |
3278 |
|
3284 | |||
3279 | 2003-10-06 Fernando Perez <fperez@colorado.edu> |
|
3285 | 2003-10-06 Fernando Perez <fperez@colorado.edu> | |
3280 |
|
3286 | |||
3281 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to |
|
3287 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to | |
3282 | prevent crashes if sys lacks an argv attribute (it happens with |
|
3288 | prevent crashes if sys lacks an argv attribute (it happens with | |
3283 | embedded interpreters which build a bare-bones sys module). |
|
3289 | embedded interpreters which build a bare-bones sys module). | |
3284 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. |
|
3290 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. | |
3285 |
|
3291 | |||
3286 | 2003-09-24 Fernando Perez <fperez@colorado.edu> |
|
3292 | 2003-09-24 Fernando Perez <fperez@colorado.edu> | |
3287 |
|
3293 | |||
3288 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() |
|
3294 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() | |
3289 | to protect against poorly written user objects where __getattr__ |
|
3295 | to protect against poorly written user objects where __getattr__ | |
3290 | raises exceptions other than AttributeError. Thanks to a bug |
|
3296 | raises exceptions other than AttributeError. Thanks to a bug | |
3291 | report by Oliver Sander <osander-AT-gmx.de>. |
|
3297 | report by Oliver Sander <osander-AT-gmx.de>. | |
3292 |
|
3298 | |||
3293 | * IPython/FakeModule.py (FakeModule.__repr__): this method was |
|
3299 | * IPython/FakeModule.py (FakeModule.__repr__): this method was | |
3294 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. |
|
3300 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. | |
3295 |
|
3301 | |||
3296 | 2003-09-09 Fernando Perez <fperez@colorado.edu> |
|
3302 | 2003-09-09 Fernando Perez <fperez@colorado.edu> | |
3297 |
|
3303 | |||
3298 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
3304 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
3299 | unpacking a list whith a callable as first element would |
|
3305 | unpacking a list whith a callable as first element would | |
3300 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery |
|
3306 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery | |
3301 | Collins. |
|
3307 | Collins. | |
3302 |
|
3308 | |||
3303 | 2003-08-25 *** Released version 0.5.0 |
|
3309 | 2003-08-25 *** Released version 0.5.0 | |
3304 |
|
3310 | |||
3305 | 2003-08-22 Fernando Perez <fperez@colorado.edu> |
|
3311 | 2003-08-22 Fernando Perez <fperez@colorado.edu> | |
3306 |
|
3312 | |||
3307 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of |
|
3313 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of | |
3308 | improperly defined user exceptions. Thanks to feedback from Mark |
|
3314 | improperly defined user exceptions. Thanks to feedback from Mark | |
3309 | Russell <mrussell-AT-verio.net>. |
|
3315 | Russell <mrussell-AT-verio.net>. | |
3310 |
|
3316 | |||
3311 | 2003-08-20 Fernando Perez <fperez@colorado.edu> |
|
3317 | 2003-08-20 Fernando Perez <fperez@colorado.edu> | |
3312 |
|
3318 | |||
3313 | * IPython/OInspect.py (Inspector.pinfo): changed String Form |
|
3319 | * IPython/OInspect.py (Inspector.pinfo): changed String Form | |
3314 | printing so that it would print multi-line string forms starting |
|
3320 | printing so that it would print multi-line string forms starting | |
3315 | with a new line. This way the formatting is better respected for |
|
3321 | with a new line. This way the formatting is better respected for | |
3316 | objects which work hard to make nice string forms. |
|
3322 | objects which work hard to make nice string forms. | |
3317 |
|
3323 | |||
3318 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where |
|
3324 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where | |
3319 | autocall would overtake data access for objects with both |
|
3325 | autocall would overtake data access for objects with both | |
3320 | __getitem__ and __call__. |
|
3326 | __getitem__ and __call__. | |
3321 |
|
3327 | |||
3322 | 2003-08-19 *** Released version 0.5.0-rc1 |
|
3328 | 2003-08-19 *** Released version 0.5.0-rc1 | |
3323 |
|
3329 | |||
3324 | 2003-08-19 Fernando Perez <fperez@colorado.edu> |
|
3330 | 2003-08-19 Fernando Perez <fperez@colorado.edu> | |
3325 |
|
3331 | |||
3326 | * IPython/deep_reload.py (load_tail): single tiny change here |
|
3332 | * IPython/deep_reload.py (load_tail): single tiny change here | |
3327 | seems to fix the long-standing bug of dreload() failing to work |
|
3333 | seems to fix the long-standing bug of dreload() failing to work | |
3328 | for dotted names. But this module is pretty tricky, so I may have |
|
3334 | for dotted names. But this module is pretty tricky, so I may have | |
3329 | missed some subtlety. Needs more testing!. |
|
3335 | missed some subtlety. Needs more testing!. | |
3330 |
|
3336 | |||
3331 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user |
|
3337 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user | |
3332 | exceptions which have badly implemented __str__ methods. |
|
3338 | exceptions which have badly implemented __str__ methods. | |
3333 | (VerboseTB.text): harden against inspect.getinnerframes crashing, |
|
3339 | (VerboseTB.text): harden against inspect.getinnerframes crashing, | |
3334 | which I've been getting reports about from Python 2.3 users. I |
|
3340 | which I've been getting reports about from Python 2.3 users. I | |
3335 | wish I had a simple test case to reproduce the problem, so I could |
|
3341 | wish I had a simple test case to reproduce the problem, so I could | |
3336 | either write a cleaner workaround or file a bug report if |
|
3342 | either write a cleaner workaround or file a bug report if | |
3337 | necessary. |
|
3343 | necessary. | |
3338 |
|
3344 | |||
3339 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after |
|
3345 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after | |
3340 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to |
|
3346 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to | |
3341 | a bug report by Tjabo Kloppenburg. |
|
3347 | a bug report by Tjabo Kloppenburg. | |
3342 |
|
3348 | |||
3343 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb |
|
3349 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb | |
3344 | crashes. Wrapped the pdb call in a blanket try/except, since pdb |
|
3350 | crashes. Wrapped the pdb call in a blanket try/except, since pdb | |
3345 | seems rather unstable. Thanks to a bug report by Tjabo |
|
3351 | seems rather unstable. Thanks to a bug report by Tjabo | |
3346 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. |
|
3352 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. | |
3347 |
|
3353 | |||
3348 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put |
|
3354 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put | |
3349 | this out soon because of the critical fixes in the inner loop for |
|
3355 | this out soon because of the critical fixes in the inner loop for | |
3350 | generators. |
|
3356 | generators. | |
3351 |
|
3357 | |||
3352 | * IPython/Magic.py (Magic.getargspec): removed. This (and |
|
3358 | * IPython/Magic.py (Magic.getargspec): removed. This (and | |
3353 | _get_def) have been obsoleted by OInspect for a long time, I |
|
3359 | _get_def) have been obsoleted by OInspect for a long time, I | |
3354 | hadn't noticed that they were dead code. |
|
3360 | hadn't noticed that they were dead code. | |
3355 | (Magic._ofind): restored _ofind functionality for a few literals |
|
3361 | (Magic._ofind): restored _ofind functionality for a few literals | |
3356 | (those in ["''",'""','[]','{}','()']). But it won't work anymore |
|
3362 | (those in ["''",'""','[]','{}','()']). But it won't work anymore | |
3357 | for things like "hello".capitalize?, since that would require a |
|
3363 | for things like "hello".capitalize?, since that would require a | |
3358 | potentially dangerous eval() again. |
|
3364 | potentially dangerous eval() again. | |
3359 |
|
3365 | |||
3360 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the |
|
3366 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the | |
3361 | logic a bit more to clean up the escapes handling and minimize the |
|
3367 | logic a bit more to clean up the escapes handling and minimize the | |
3362 | use of _ofind to only necessary cases. The interactive 'feel' of |
|
3368 | use of _ofind to only necessary cases. The interactive 'feel' of | |
3363 | IPython should have improved quite a bit with the changes in |
|
3369 | IPython should have improved quite a bit with the changes in | |
3364 | _prefilter and _ofind (besides being far safer than before). |
|
3370 | _prefilter and _ofind (besides being far safer than before). | |
3365 |
|
3371 | |||
3366 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather |
|
3372 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather | |
3367 | obscure, never reported). Edit would fail to find the object to |
|
3373 | obscure, never reported). Edit would fail to find the object to | |
3368 | edit under some circumstances. |
|
3374 | edit under some circumstances. | |
3369 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls |
|
3375 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls | |
3370 | which were causing double-calling of generators. Those eval calls |
|
3376 | which were causing double-calling of generators. Those eval calls | |
3371 | were _very_ dangerous, since code with side effects could be |
|
3377 | were _very_ dangerous, since code with side effects could be | |
3372 | triggered. As they say, 'eval is evil'... These were the |
|
3378 | triggered. As they say, 'eval is evil'... These were the | |
3373 | nastiest evals in IPython. Besides, _ofind is now far simpler, |
|
3379 | nastiest evals in IPython. Besides, _ofind is now far simpler, | |
3374 | and it should also be quite a bit faster. Its use of inspect is |
|
3380 | and it should also be quite a bit faster. Its use of inspect is | |
3375 | also safer, so perhaps some of the inspect-related crashes I've |
|
3381 | also safer, so perhaps some of the inspect-related crashes I've | |
3376 | seen lately with Python 2.3 might be taken care of. That will |
|
3382 | seen lately with Python 2.3 might be taken care of. That will | |
3377 | need more testing. |
|
3383 | need more testing. | |
3378 |
|
3384 | |||
3379 | 2003-08-17 Fernando Perez <fperez@colorado.edu> |
|
3385 | 2003-08-17 Fernando Perez <fperez@colorado.edu> | |
3380 |
|
3386 | |||
3381 | * IPython/iplib.py (InteractiveShell._prefilter): significant |
|
3387 | * IPython/iplib.py (InteractiveShell._prefilter): significant | |
3382 | simplifications to the logic for handling user escapes. Faster |
|
3388 | simplifications to the logic for handling user escapes. Faster | |
3383 | and simpler code. |
|
3389 | and simpler code. | |
3384 |
|
3390 | |||
3385 | 2003-08-14 Fernando Perez <fperez@colorado.edu> |
|
3391 | 2003-08-14 Fernando Perez <fperez@colorado.edu> | |
3386 |
|
3392 | |||
3387 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. |
|
3393 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. | |
3388 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, |
|
3394 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, | |
3389 | but it should be quite a bit faster. And the recursive version |
|
3395 | but it should be quite a bit faster. And the recursive version | |
3390 | generated O(log N) intermediate storage for all rank>1 arrays, |
|
3396 | generated O(log N) intermediate storage for all rank>1 arrays, | |
3391 | even if they were contiguous. |
|
3397 | even if they were contiguous. | |
3392 | (l1norm): Added this function. |
|
3398 | (l1norm): Added this function. | |
3393 | (norm): Added this function for arbitrary norms (including |
|
3399 | (norm): Added this function for arbitrary norms (including | |
3394 | l-infinity). l1 and l2 are still special cases for convenience |
|
3400 | l-infinity). l1 and l2 are still special cases for convenience | |
3395 | and speed. |
|
3401 | and speed. | |
3396 |
|
3402 | |||
3397 | 2003-08-03 Fernando Perez <fperez@colorado.edu> |
|
3403 | 2003-08-03 Fernando Perez <fperez@colorado.edu> | |
3398 |
|
3404 | |||
3399 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string |
|
3405 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string | |
3400 | exceptions, which now raise PendingDeprecationWarnings in Python |
|
3406 | exceptions, which now raise PendingDeprecationWarnings in Python | |
3401 | 2.3. There were some in Magic and some in Gnuplot2. |
|
3407 | 2.3. There were some in Magic and some in Gnuplot2. | |
3402 |
|
3408 | |||
3403 | 2003-06-30 Fernando Perez <fperez@colorado.edu> |
|
3409 | 2003-06-30 Fernando Perez <fperez@colorado.edu> | |
3404 |
|
3410 | |||
3405 | * IPython/genutils.py (page): modified to call curses only for |
|
3411 | * IPython/genutils.py (page): modified to call curses only for | |
3406 | terminals where TERM=='xterm'. After problems under many other |
|
3412 | terminals where TERM=='xterm'. After problems under many other | |
3407 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. |
|
3413 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. | |
3408 |
|
3414 | |||
3409 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which |
|
3415 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which | |
3410 | would be triggered when readline was absent. This was just an old |
|
3416 | would be triggered when readline was absent. This was just an old | |
3411 | debugging statement I'd forgotten to take out. |
|
3417 | debugging statement I'd forgotten to take out. | |
3412 |
|
3418 | |||
3413 | 2003-06-20 Fernando Perez <fperez@colorado.edu> |
|
3419 | 2003-06-20 Fernando Perez <fperez@colorado.edu> | |
3414 |
|
3420 | |||
3415 | * IPython/genutils.py (clock): modified to return only user time |
|
3421 | * IPython/genutils.py (clock): modified to return only user time | |
3416 | (not counting system time), after a discussion on scipy. While |
|
3422 | (not counting system time), after a discussion on scipy. While | |
3417 | system time may be a useful quantity occasionally, it may much |
|
3423 | system time may be a useful quantity occasionally, it may much | |
3418 | more easily be skewed by occasional swapping or other similar |
|
3424 | more easily be skewed by occasional swapping or other similar | |
3419 | activity. |
|
3425 | activity. | |
3420 |
|
3426 | |||
3421 | 2003-06-05 Fernando Perez <fperez@colorado.edu> |
|
3427 | 2003-06-05 Fernando Perez <fperez@colorado.edu> | |
3422 |
|
3428 | |||
3423 | * IPython/numutils.py (identity): new function, for building |
|
3429 | * IPython/numutils.py (identity): new function, for building | |
3424 | arbitrary rank Kronecker deltas (mostly backwards compatible with |
|
3430 | arbitrary rank Kronecker deltas (mostly backwards compatible with | |
3425 | Numeric.identity) |
|
3431 | Numeric.identity) | |
3426 |
|
3432 | |||
3427 | 2003-06-03 Fernando Perez <fperez@colorado.edu> |
|
3433 | 2003-06-03 Fernando Perez <fperez@colorado.edu> | |
3428 |
|
3434 | |||
3429 | * IPython/iplib.py (InteractiveShell.handle_magic): protect |
|
3435 | * IPython/iplib.py (InteractiveShell.handle_magic): protect | |
3430 | arguments passed to magics with spaces, to allow trailing '\' to |
|
3436 | arguments passed to magics with spaces, to allow trailing '\' to | |
3431 | work normally (mainly for Windows users). |
|
3437 | work normally (mainly for Windows users). | |
3432 |
|
3438 | |||
3433 | 2003-05-29 Fernando Perez <fperez@colorado.edu> |
|
3439 | 2003-05-29 Fernando Perez <fperez@colorado.edu> | |
3434 |
|
3440 | |||
3435 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help |
|
3441 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help | |
3436 | instead of pydoc.help. This fixes a bizarre behavior where |
|
3442 | instead of pydoc.help. This fixes a bizarre behavior where | |
3437 | printing '%s' % locals() would trigger the help system. Now |
|
3443 | printing '%s' % locals() would trigger the help system. Now | |
3438 | ipython behaves like normal python does. |
|
3444 | ipython behaves like normal python does. | |
3439 |
|
3445 | |||
3440 | Note that if one does 'from pydoc import help', the bizarre |
|
3446 | Note that if one does 'from pydoc import help', the bizarre | |
3441 | behavior returns, but this will also happen in normal python, so |
|
3447 | behavior returns, but this will also happen in normal python, so | |
3442 | it's not an ipython bug anymore (it has to do with how pydoc.help |
|
3448 | it's not an ipython bug anymore (it has to do with how pydoc.help | |
3443 | is implemented). |
|
3449 | is implemented). | |
3444 |
|
3450 | |||
3445 | 2003-05-22 Fernando Perez <fperez@colorado.edu> |
|
3451 | 2003-05-22 Fernando Perez <fperez@colorado.edu> | |
3446 |
|
3452 | |||
3447 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to |
|
3453 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to | |
3448 | return [] instead of None when nothing matches, also match to end |
|
3454 | return [] instead of None when nothing matches, also match to end | |
3449 | of line. Patch by Gary Bishop. |
|
3455 | of line. Patch by Gary Bishop. | |
3450 |
|
3456 | |||
3451 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook |
|
3457 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook | |
3452 | protection as before, for files passed on the command line. This |
|
3458 | protection as before, for files passed on the command line. This | |
3453 | prevents the CrashHandler from kicking in if user files call into |
|
3459 | prevents the CrashHandler from kicking in if user files call into | |
3454 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of |
|
3460 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of | |
3455 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> |
|
3461 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> | |
3456 |
|
3462 | |||
3457 | 2003-05-20 *** Released version 0.4.0 |
|
3463 | 2003-05-20 *** Released version 0.4.0 | |
3458 |
|
3464 | |||
3459 | 2003-05-20 Fernando Perez <fperez@colorado.edu> |
|
3465 | 2003-05-20 Fernando Perez <fperez@colorado.edu> | |
3460 |
|
3466 | |||
3461 | * setup.py: added support for manpages. It's a bit hackish b/c of |
|
3467 | * setup.py: added support for manpages. It's a bit hackish b/c of | |
3462 | a bug in the way the bdist_rpm distutils target handles gzipped |
|
3468 | a bug in the way the bdist_rpm distutils target handles gzipped | |
3463 | manpages, but it works. After a patch by Jack. |
|
3469 | manpages, but it works. After a patch by Jack. | |
3464 |
|
3470 | |||
3465 | 2003-05-19 Fernando Perez <fperez@colorado.edu> |
|
3471 | 2003-05-19 Fernando Perez <fperez@colorado.edu> | |
3466 |
|
3472 | |||
3467 | * IPython/numutils.py: added a mockup of the kinds module, since |
|
3473 | * IPython/numutils.py: added a mockup of the kinds module, since | |
3468 | it was recently removed from Numeric. This way, numutils will |
|
3474 | it was recently removed from Numeric. This way, numutils will | |
3469 | work for all users even if they are missing kinds. |
|
3475 | work for all users even if they are missing kinds. | |
3470 |
|
3476 | |||
3471 | * IPython/Magic.py (Magic._ofind): Harden against an inspect |
|
3477 | * IPython/Magic.py (Magic._ofind): Harden against an inspect | |
3472 | failure, which can occur with SWIG-wrapped extensions. After a |
|
3478 | failure, which can occur with SWIG-wrapped extensions. After a | |
3473 | crash report from Prabhu. |
|
3479 | crash report from Prabhu. | |
3474 |
|
3480 | |||
3475 | 2003-05-16 Fernando Perez <fperez@colorado.edu> |
|
3481 | 2003-05-16 Fernando Perez <fperez@colorado.edu> | |
3476 |
|
3482 | |||
3477 | * IPython/iplib.py (InteractiveShell.excepthook): New method to |
|
3483 | * IPython/iplib.py (InteractiveShell.excepthook): New method to | |
3478 | protect ipython from user code which may call directly |
|
3484 | protect ipython from user code which may call directly | |
3479 | sys.excepthook (this looks like an ipython crash to the user, even |
|
3485 | sys.excepthook (this looks like an ipython crash to the user, even | |
3480 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
3486 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
3481 | This is especially important to help users of WxWindows, but may |
|
3487 | This is especially important to help users of WxWindows, but may | |
3482 | also be useful in other cases. |
|
3488 | also be useful in other cases. | |
3483 |
|
3489 | |||
3484 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow |
|
3490 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow | |
3485 | an optional tb_offset to be specified, and to preserve exception |
|
3491 | an optional tb_offset to be specified, and to preserve exception | |
3486 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
3492 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
3487 |
|
3493 | |||
3488 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! |
|
3494 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! | |
3489 |
|
3495 | |||
3490 | 2003-05-15 Fernando Perez <fperez@colorado.edu> |
|
3496 | 2003-05-15 Fernando Perez <fperez@colorado.edu> | |
3491 |
|
3497 | |||
3492 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when |
|
3498 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when | |
3493 | installing for a new user under Windows. |
|
3499 | installing for a new user under Windows. | |
3494 |
|
3500 | |||
3495 | 2003-05-12 Fernando Perez <fperez@colorado.edu> |
|
3501 | 2003-05-12 Fernando Perez <fperez@colorado.edu> | |
3496 |
|
3502 | |||
3497 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line |
|
3503 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line | |
3498 | handler for Emacs comint-based lines. Currently it doesn't do |
|
3504 | handler for Emacs comint-based lines. Currently it doesn't do | |
3499 | much (but importantly, it doesn't update the history cache). In |
|
3505 | much (but importantly, it doesn't update the history cache). In | |
3500 | the future it may be expanded if Alex needs more functionality |
|
3506 | the future it may be expanded if Alex needs more functionality | |
3501 | there. |
|
3507 | there. | |
3502 |
|
3508 | |||
3503 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform |
|
3509 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform | |
3504 | info to crash reports. |
|
3510 | info to crash reports. | |
3505 |
|
3511 | |||
3506 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, |
|
3512 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, | |
3507 | just like Python's -c. Also fixed crash with invalid -color |
|
3513 | just like Python's -c. Also fixed crash with invalid -color | |
3508 | option value at startup. Thanks to Will French |
|
3514 | option value at startup. Thanks to Will French | |
3509 | <wfrench-AT-bestweb.net> for the bug report. |
|
3515 | <wfrench-AT-bestweb.net> for the bug report. | |
3510 |
|
3516 | |||
3511 | 2003-05-09 Fernando Perez <fperez@colorado.edu> |
|
3517 | 2003-05-09 Fernando Perez <fperez@colorado.edu> | |
3512 |
|
3518 | |||
3513 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString |
|
3519 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString | |
3514 | to EvalDict (it's a mapping, after all) and simplified its code |
|
3520 | to EvalDict (it's a mapping, after all) and simplified its code | |
3515 | quite a bit, after a nice discussion on c.l.py where Gustavo |
|
3521 | quite a bit, after a nice discussion on c.l.py where Gustavo | |
3516 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. |
|
3522 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. | |
3517 |
|
3523 | |||
3518 | 2003-04-30 Fernando Perez <fperez@colorado.edu> |
|
3524 | 2003-04-30 Fernando Perez <fperez@colorado.edu> | |
3519 |
|
3525 | |||
3520 | * IPython/genutils.py (timings_out): modified it to reduce its |
|
3526 | * IPython/genutils.py (timings_out): modified it to reduce its | |
3521 | overhead in the common reps==1 case. |
|
3527 | overhead in the common reps==1 case. | |
3522 |
|
3528 | |||
3523 | 2003-04-29 Fernando Perez <fperez@colorado.edu> |
|
3529 | 2003-04-29 Fernando Perez <fperez@colorado.edu> | |
3524 |
|
3530 | |||
3525 | * IPython/genutils.py (timings_out): Modified to use the resource |
|
3531 | * IPython/genutils.py (timings_out): Modified to use the resource | |
3526 | module, which avoids the wraparound problems of time.clock(). |
|
3532 | module, which avoids the wraparound problems of time.clock(). | |
3527 |
|
3533 | |||
3528 | 2003-04-17 *** Released version 0.2.15pre4 |
|
3534 | 2003-04-17 *** Released version 0.2.15pre4 | |
3529 |
|
3535 | |||
3530 | 2003-04-17 Fernando Perez <fperez@colorado.edu> |
|
3536 | 2003-04-17 Fernando Perez <fperez@colorado.edu> | |
3531 |
|
3537 | |||
3532 | * setup.py (scriptfiles): Split windows-specific stuff over to a |
|
3538 | * setup.py (scriptfiles): Split windows-specific stuff over to a | |
3533 | separate file, in an attempt to have a Windows GUI installer. |
|
3539 | separate file, in an attempt to have a Windows GUI installer. | |
3534 | That didn't work, but part of the groundwork is done. |
|
3540 | That didn't work, but part of the groundwork is done. | |
3535 |
|
3541 | |||
3536 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for |
|
3542 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for | |
3537 | indent/unindent with 4 spaces. Particularly useful in combination |
|
3543 | indent/unindent with 4 spaces. Particularly useful in combination | |
3538 | with the new auto-indent option. |
|
3544 | with the new auto-indent option. | |
3539 |
|
3545 | |||
3540 | 2003-04-16 Fernando Perez <fperez@colorado.edu> |
|
3546 | 2003-04-16 Fernando Perez <fperez@colorado.edu> | |
3541 |
|
3547 | |||
3542 | * IPython/Magic.py: various replacements of self.rc for |
|
3548 | * IPython/Magic.py: various replacements of self.rc for | |
3543 | self.shell.rc. A lot more remains to be done to fully disentangle |
|
3549 | self.shell.rc. A lot more remains to be done to fully disentangle | |
3544 | this class from the main Shell class. |
|
3550 | this class from the main Shell class. | |
3545 |
|
3551 | |||
3546 | * IPython/GnuplotRuntime.py: added checks for mouse support so |
|
3552 | * IPython/GnuplotRuntime.py: added checks for mouse support so | |
3547 | that we don't try to enable it if the current gnuplot doesn't |
|
3553 | that we don't try to enable it if the current gnuplot doesn't | |
3548 | really support it. Also added checks so that we don't try to |
|
3554 | really support it. Also added checks so that we don't try to | |
3549 | enable persist under Windows (where Gnuplot doesn't recognize the |
|
3555 | enable persist under Windows (where Gnuplot doesn't recognize the | |
3550 | option). |
|
3556 | option). | |
3551 |
|
3557 | |||
3552 | * IPython/iplib.py (InteractiveShell.interact): Added optional |
|
3558 | * IPython/iplib.py (InteractiveShell.interact): Added optional | |
3553 | auto-indenting code, after a patch by King C. Shu |
|
3559 | auto-indenting code, after a patch by King C. Shu | |
3554 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't |
|
3560 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't | |
3555 | get along well with pasting indented code. If I ever figure out |
|
3561 | get along well with pasting indented code. If I ever figure out | |
3556 | how to make that part go well, it will become on by default. |
|
3562 | how to make that part go well, it will become on by default. | |
3557 |
|
3563 | |||
3558 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would |
|
3564 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would | |
3559 | crash ipython if there was an unmatched '%' in the user's prompt |
|
3565 | crash ipython if there was an unmatched '%' in the user's prompt | |
3560 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
3566 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
3561 |
|
3567 | |||
3562 | * IPython/iplib.py (InteractiveShell.interact): removed the |
|
3568 | * IPython/iplib.py (InteractiveShell.interact): removed the | |
3563 | ability to ask the user whether he wants to crash or not at the |
|
3569 | ability to ask the user whether he wants to crash or not at the | |
3564 | 'last line' exception handler. Calling functions at that point |
|
3570 | 'last line' exception handler. Calling functions at that point | |
3565 | changes the stack, and the error reports would have incorrect |
|
3571 | changes the stack, and the error reports would have incorrect | |
3566 | tracebacks. |
|
3572 | tracebacks. | |
3567 |
|
3573 | |||
3568 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to |
|
3574 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to | |
3569 | pass through a peger a pretty-printed form of any object. After a |
|
3575 | pass through a peger a pretty-printed form of any object. After a | |
3570 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> |
|
3576 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> | |
3571 |
|
3577 | |||
3572 | 2003-04-14 Fernando Perez <fperez@colorado.edu> |
|
3578 | 2003-04-14 Fernando Perez <fperez@colorado.edu> | |
3573 |
|
3579 | |||
3574 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where |
|
3580 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where | |
3575 | all files in ~ would be modified at first install (instead of |
|
3581 | all files in ~ would be modified at first install (instead of | |
3576 | ~/.ipython). This could be potentially disastrous, as the |
|
3582 | ~/.ipython). This could be potentially disastrous, as the | |
3577 | modification (make line-endings native) could damage binary files. |
|
3583 | modification (make line-endings native) could damage binary files. | |
3578 |
|
3584 | |||
3579 | 2003-04-10 Fernando Perez <fperez@colorado.edu> |
|
3585 | 2003-04-10 Fernando Perez <fperez@colorado.edu> | |
3580 |
|
3586 | |||
3581 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to |
|
3587 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to | |
3582 | handle only lines which are invalid python. This now means that |
|
3588 | handle only lines which are invalid python. This now means that | |
3583 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins |
|
3589 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins | |
3584 | for the bug report. |
|
3590 | for the bug report. | |
3585 |
|
3591 | |||
3586 | 2003-04-01 Fernando Perez <fperez@colorado.edu> |
|
3592 | 2003-04-01 Fernando Perez <fperez@colorado.edu> | |
3587 |
|
3593 | |||
3588 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug |
|
3594 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug | |
3589 | where failing to set sys.last_traceback would crash pdb.pm(). |
|
3595 | where failing to set sys.last_traceback would crash pdb.pm(). | |
3590 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug |
|
3596 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug | |
3591 | report. |
|
3597 | report. | |
3592 |
|
3598 | |||
3593 | 2003-03-25 Fernando Perez <fperez@colorado.edu> |
|
3599 | 2003-03-25 Fernando Perez <fperez@colorado.edu> | |
3594 |
|
3600 | |||
3595 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler |
|
3601 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler | |
3596 | before printing it (it had a lot of spurious blank lines at the |
|
3602 | before printing it (it had a lot of spurious blank lines at the | |
3597 | end). |
|
3603 | end). | |
3598 |
|
3604 | |||
3599 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr |
|
3605 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr | |
3600 | output would be sent 21 times! Obviously people don't use this |
|
3606 | output would be sent 21 times! Obviously people don't use this | |
3601 | too often, or I would have heard about it. |
|
3607 | too often, or I would have heard about it. | |
3602 |
|
3608 | |||
3603 | 2003-03-24 Fernando Perez <fperez@colorado.edu> |
|
3609 | 2003-03-24 Fernando Perez <fperez@colorado.edu> | |
3604 |
|
3610 | |||
3605 | * setup.py (scriptfiles): renamed the data_files parameter from |
|
3611 | * setup.py (scriptfiles): renamed the data_files parameter from | |
3606 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink |
|
3612 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink | |
3607 | for the patch. |
|
3613 | for the patch. | |
3608 |
|
3614 | |||
3609 | 2003-03-20 Fernando Perez <fperez@colorado.edu> |
|
3615 | 2003-03-20 Fernando Perez <fperez@colorado.edu> | |
3610 |
|
3616 | |||
3611 | * IPython/genutils.py (error): added error() and fatal() |
|
3617 | * IPython/genutils.py (error): added error() and fatal() | |
3612 | functions. |
|
3618 | functions. | |
3613 |
|
3619 | |||
3614 | 2003-03-18 *** Released version 0.2.15pre3 |
|
3620 | 2003-03-18 *** Released version 0.2.15pre3 | |
3615 |
|
3621 | |||
3616 | 2003-03-18 Fernando Perez <fperez@colorado.edu> |
|
3622 | 2003-03-18 Fernando Perez <fperez@colorado.edu> | |
3617 |
|
3623 | |||
3618 | * setupext/install_data_ext.py |
|
3624 | * setupext/install_data_ext.py | |
3619 | (install_data_ext.initialize_options): Class contributed by Jack |
|
3625 | (install_data_ext.initialize_options): Class contributed by Jack | |
3620 | Moffit for fixing the old distutils hack. He is sending this to |
|
3626 | Moffit for fixing the old distutils hack. He is sending this to | |
3621 | the distutils folks so in the future we may not need it as a |
|
3627 | the distutils folks so in the future we may not need it as a | |
3622 | private fix. |
|
3628 | private fix. | |
3623 |
|
3629 | |||
3624 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's |
|
3630 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's | |
3625 | changes for Debian packaging. See his patch for full details. |
|
3631 | changes for Debian packaging. See his patch for full details. | |
3626 | The old distutils hack of making the ipythonrc* files carry a |
|
3632 | The old distutils hack of making the ipythonrc* files carry a | |
3627 | bogus .py extension is gone, at last. Examples were moved to a |
|
3633 | bogus .py extension is gone, at last. Examples were moved to a | |
3628 | separate subdir under doc/, and the separate executable scripts |
|
3634 | separate subdir under doc/, and the separate executable scripts | |
3629 | now live in their own directory. Overall a great cleanup. The |
|
3635 | now live in their own directory. Overall a great cleanup. The | |
3630 | manual was updated to use the new files, and setup.py has been |
|
3636 | manual was updated to use the new files, and setup.py has been | |
3631 | fixed for this setup. |
|
3637 | fixed for this setup. | |
3632 |
|
3638 | |||
3633 | * IPython/PyColorize.py (Parser.usage): made non-executable and |
|
3639 | * IPython/PyColorize.py (Parser.usage): made non-executable and | |
3634 | created a pycolor wrapper around it to be included as a script. |
|
3640 | created a pycolor wrapper around it to be included as a script. | |
3635 |
|
3641 | |||
3636 | 2003-03-12 *** Released version 0.2.15pre2 |
|
3642 | 2003-03-12 *** Released version 0.2.15pre2 | |
3637 |
|
3643 | |||
3638 | 2003-03-12 Fernando Perez <fperez@colorado.edu> |
|
3644 | 2003-03-12 Fernando Perez <fperez@colorado.edu> | |
3639 |
|
3645 | |||
3640 | * IPython/ColorANSI.py (make_color_table): Finally fixed the |
|
3646 | * IPython/ColorANSI.py (make_color_table): Finally fixed the | |
3641 | long-standing problem with garbage characters in some terminals. |
|
3647 | long-standing problem with garbage characters in some terminals. | |
3642 | The issue was really that the \001 and \002 escapes must _only_ be |
|
3648 | The issue was really that the \001 and \002 escapes must _only_ be | |
3643 | passed to input prompts (which call readline), but _never_ to |
|
3649 | passed to input prompts (which call readline), but _never_ to | |
3644 | normal text to be printed on screen. I changed ColorANSI to have |
|
3650 | normal text to be printed on screen. I changed ColorANSI to have | |
3645 | two classes: TermColors and InputTermColors, each with the |
|
3651 | two classes: TermColors and InputTermColors, each with the | |
3646 | appropriate escapes for input prompts or normal text. The code in |
|
3652 | appropriate escapes for input prompts or normal text. The code in | |
3647 | Prompts.py got slightly more complicated, but this very old and |
|
3653 | Prompts.py got slightly more complicated, but this very old and | |
3648 | annoying bug is finally fixed. |
|
3654 | annoying bug is finally fixed. | |
3649 |
|
3655 | |||
3650 | All the credit for nailing down the real origin of this problem |
|
3656 | All the credit for nailing down the real origin of this problem | |
3651 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. |
|
3657 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. | |
3652 | *Many* thanks to him for spending quite a bit of effort on this. |
|
3658 | *Many* thanks to him for spending quite a bit of effort on this. | |
3653 |
|
3659 | |||
3654 | 2003-03-05 *** Released version 0.2.15pre1 |
|
3660 | 2003-03-05 *** Released version 0.2.15pre1 | |
3655 |
|
3661 | |||
3656 | 2003-03-03 Fernando Perez <fperez@colorado.edu> |
|
3662 | 2003-03-03 Fernando Perez <fperez@colorado.edu> | |
3657 |
|
3663 | |||
3658 | * IPython/FakeModule.py: Moved the former _FakeModule to a |
|
3664 | * IPython/FakeModule.py: Moved the former _FakeModule to a | |
3659 | separate file, because it's also needed by Magic (to fix a similar |
|
3665 | separate file, because it's also needed by Magic (to fix a similar | |
3660 | pickle-related issue in @run). |
|
3666 | pickle-related issue in @run). | |
3661 |
|
3667 | |||
3662 | 2003-03-02 Fernando Perez <fperez@colorado.edu> |
|
3668 | 2003-03-02 Fernando Perez <fperez@colorado.edu> | |
3663 |
|
3669 | |||
3664 | * IPython/Magic.py (Magic.magic_autocall): new magic to control |
|
3670 | * IPython/Magic.py (Magic.magic_autocall): new magic to control | |
3665 | the autocall option at runtime. |
|
3671 | the autocall option at runtime. | |
3666 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns |
|
3672 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns | |
3667 | across Magic.py to start separating Magic from InteractiveShell. |
|
3673 | across Magic.py to start separating Magic from InteractiveShell. | |
3668 | (Magic._ofind): Fixed to return proper namespace for dotted |
|
3674 | (Magic._ofind): Fixed to return proper namespace for dotted | |
3669 | names. Before, a dotted name would always return 'not currently |
|
3675 | names. Before, a dotted name would always return 'not currently | |
3670 | defined', because it would find the 'parent'. s.x would be found, |
|
3676 | defined', because it would find the 'parent'. s.x would be found, | |
3671 | but since 'x' isn't defined by itself, it would get confused. |
|
3677 | but since 'x' isn't defined by itself, it would get confused. | |
3672 | (Magic.magic_run): Fixed pickling problems reported by Ralf |
|
3678 | (Magic.magic_run): Fixed pickling problems reported by Ralf | |
3673 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to |
|
3679 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to | |
3674 | that I'd used when Mike Heeter reported similar issues at the |
|
3680 | that I'd used when Mike Heeter reported similar issues at the | |
3675 | top-level, but now for @run. It boils down to injecting the |
|
3681 | top-level, but now for @run. It boils down to injecting the | |
3676 | namespace where code is being executed with something that looks |
|
3682 | namespace where code is being executed with something that looks | |
3677 | enough like a module to fool pickle.dump(). Since a pickle stores |
|
3683 | enough like a module to fool pickle.dump(). Since a pickle stores | |
3678 | a named reference to the importing module, we need this for |
|
3684 | a named reference to the importing module, we need this for | |
3679 | pickles to save something sensible. |
|
3685 | pickles to save something sensible. | |
3680 |
|
3686 | |||
3681 | * IPython/ipmaker.py (make_IPython): added an autocall option. |
|
3687 | * IPython/ipmaker.py (make_IPython): added an autocall option. | |
3682 |
|
3688 | |||
3683 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of |
|
3689 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of | |
3684 | the auto-eval code. Now autocalling is an option, and the code is |
|
3690 | the auto-eval code. Now autocalling is an option, and the code is | |
3685 | also vastly safer. There is no more eval() involved at all. |
|
3691 | also vastly safer. There is no more eval() involved at all. | |
3686 |
|
3692 | |||
3687 | 2003-03-01 Fernando Perez <fperez@colorado.edu> |
|
3693 | 2003-03-01 Fernando Perez <fperez@colorado.edu> | |
3688 |
|
3694 | |||
3689 | * IPython/Magic.py (Magic._ofind): Changed interface to return a |
|
3695 | * IPython/Magic.py (Magic._ofind): Changed interface to return a | |
3690 | dict with named keys instead of a tuple. |
|
3696 | dict with named keys instead of a tuple. | |
3691 |
|
3697 | |||
3692 | * IPython: Started using CVS for IPython as of 0.2.15pre1. |
|
3698 | * IPython: Started using CVS for IPython as of 0.2.15pre1. | |
3693 |
|
3699 | |||
3694 | * setup.py (make_shortcut): Fixed message about directories |
|
3700 | * setup.py (make_shortcut): Fixed message about directories | |
3695 | created during Windows installation (the directories were ok, just |
|
3701 | created during Windows installation (the directories were ok, just | |
3696 | the printed message was misleading). Thanks to Chris Liechti |
|
3702 | the printed message was misleading). Thanks to Chris Liechti | |
3697 | <cliechti-AT-gmx.net> for the heads up. |
|
3703 | <cliechti-AT-gmx.net> for the heads up. | |
3698 |
|
3704 | |||
3699 | 2003-02-21 Fernando Perez <fperez@colorado.edu> |
|
3705 | 2003-02-21 Fernando Perez <fperez@colorado.edu> | |
3700 |
|
3706 | |||
3701 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching |
|
3707 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching | |
3702 | of ValueError exception when checking for auto-execution. This |
|
3708 | of ValueError exception when checking for auto-execution. This | |
3703 | one is raised by things like Numeric arrays arr.flat when the |
|
3709 | one is raised by things like Numeric arrays arr.flat when the | |
3704 | array is non-contiguous. |
|
3710 | array is non-contiguous. | |
3705 |
|
3711 | |||
3706 | 2003-01-31 Fernando Perez <fperez@colorado.edu> |
|
3712 | 2003-01-31 Fernando Perez <fperez@colorado.edu> | |
3707 |
|
3713 | |||
3708 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would |
|
3714 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would | |
3709 | not return any value at all (even though the command would get |
|
3715 | not return any value at all (even though the command would get | |
3710 | executed). |
|
3716 | executed). | |
3711 | (xsys): Flush stdout right after printing the command to ensure |
|
3717 | (xsys): Flush stdout right after printing the command to ensure | |
3712 | proper ordering of commands and command output in the total |
|
3718 | proper ordering of commands and command output in the total | |
3713 | output. |
|
3719 | output. | |
3714 | (SystemExec/xsys/bq): Switched the names of xsys/bq and |
|
3720 | (SystemExec/xsys/bq): Switched the names of xsys/bq and | |
3715 | system/getoutput as defaults. The old ones are kept for |
|
3721 | system/getoutput as defaults. The old ones are kept for | |
3716 | compatibility reasons, so no code which uses this library needs |
|
3722 | compatibility reasons, so no code which uses this library needs | |
3717 | changing. |
|
3723 | changing. | |
3718 |
|
3724 | |||
3719 | 2003-01-27 *** Released version 0.2.14 |
|
3725 | 2003-01-27 *** Released version 0.2.14 | |
3720 |
|
3726 | |||
3721 | 2003-01-25 Fernando Perez <fperez@colorado.edu> |
|
3727 | 2003-01-25 Fernando Perez <fperez@colorado.edu> | |
3722 |
|
3728 | |||
3723 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where |
|
3729 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where | |
3724 | functions defined in previous edit sessions could not be re-edited |
|
3730 | functions defined in previous edit sessions could not be re-edited | |
3725 | (because the temp files were immediately removed). Now temp files |
|
3731 | (because the temp files were immediately removed). Now temp files | |
3726 | are removed only at IPython's exit. |
|
3732 | are removed only at IPython's exit. | |
3727 | (Magic.magic_run): Improved @run to perform shell-like expansions |
|
3733 | (Magic.magic_run): Improved @run to perform shell-like expansions | |
3728 | on its arguments (~users and $VARS). With this, @run becomes more |
|
3734 | on its arguments (~users and $VARS). With this, @run becomes more | |
3729 | like a normal command-line. |
|
3735 | like a normal command-line. | |
3730 |
|
3736 | |||
3731 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small |
|
3737 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small | |
3732 | bugs related to embedding and cleaned up that code. A fairly |
|
3738 | bugs related to embedding and cleaned up that code. A fairly | |
3733 | important one was the impossibility to access the global namespace |
|
3739 | important one was the impossibility to access the global namespace | |
3734 | through the embedded IPython (only local variables were visible). |
|
3740 | through the embedded IPython (only local variables were visible). | |
3735 |
|
3741 | |||
3736 | 2003-01-14 Fernando Perez <fperez@colorado.edu> |
|
3742 | 2003-01-14 Fernando Perez <fperez@colorado.edu> | |
3737 |
|
3743 | |||
3738 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed |
|
3744 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed | |
3739 | auto-calling to be a bit more conservative. Now it doesn't get |
|
3745 | auto-calling to be a bit more conservative. Now it doesn't get | |
3740 | triggered if any of '!=()<>' are in the rest of the input line, to |
|
3746 | triggered if any of '!=()<>' are in the rest of the input line, to | |
3741 | allow comparing callables. Thanks to Alex for the heads up. |
|
3747 | allow comparing callables. Thanks to Alex for the heads up. | |
3742 |
|
3748 | |||
3743 | 2003-01-07 Fernando Perez <fperez@colorado.edu> |
|
3749 | 2003-01-07 Fernando Perez <fperez@colorado.edu> | |
3744 |
|
3750 | |||
3745 | * IPython/genutils.py (page): fixed estimation of the number of |
|
3751 | * IPython/genutils.py (page): fixed estimation of the number of | |
3746 | lines in a string to be paged to simply count newlines. This |
|
3752 | lines in a string to be paged to simply count newlines. This | |
3747 | prevents over-guessing due to embedded escape sequences. A better |
|
3753 | prevents over-guessing due to embedded escape sequences. A better | |
3748 | long-term solution would involve stripping out the control chars |
|
3754 | long-term solution would involve stripping out the control chars | |
3749 | for the count, but it's potentially so expensive I just don't |
|
3755 | for the count, but it's potentially so expensive I just don't | |
3750 | think it's worth doing. |
|
3756 | think it's worth doing. | |
3751 |
|
3757 | |||
3752 | 2002-12-19 *** Released version 0.2.14pre50 |
|
3758 | 2002-12-19 *** Released version 0.2.14pre50 | |
3753 |
|
3759 | |||
3754 | 2002-12-19 Fernando Perez <fperez@colorado.edu> |
|
3760 | 2002-12-19 Fernando Perez <fperez@colorado.edu> | |
3755 |
|
3761 | |||
3756 | * tools/release (version): Changed release scripts to inform |
|
3762 | * tools/release (version): Changed release scripts to inform | |
3757 | Andrea and build a NEWS file with a list of recent changes. |
|
3763 | Andrea and build a NEWS file with a list of recent changes. | |
3758 |
|
3764 | |||
3759 | * IPython/ColorANSI.py (__all__): changed terminal detection |
|
3765 | * IPython/ColorANSI.py (__all__): changed terminal detection | |
3760 | code. Seems to work better for xterms without breaking |
|
3766 | code. Seems to work better for xterms without breaking | |
3761 | konsole. Will need more testing to determine if WinXP and Mac OSX |
|
3767 | konsole. Will need more testing to determine if WinXP and Mac OSX | |
3762 | also work ok. |
|
3768 | also work ok. | |
3763 |
|
3769 | |||
3764 | 2002-12-18 *** Released version 0.2.14pre49 |
|
3770 | 2002-12-18 *** Released version 0.2.14pre49 | |
3765 |
|
3771 | |||
3766 | 2002-12-18 Fernando Perez <fperez@colorado.edu> |
|
3772 | 2002-12-18 Fernando Perez <fperez@colorado.edu> | |
3767 |
|
3773 | |||
3768 | * Docs: added new info about Mac OSX, from Andrea. |
|
3774 | * Docs: added new info about Mac OSX, from Andrea. | |
3769 |
|
3775 | |||
3770 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to |
|
3776 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to | |
3771 | allow direct plotting of python strings whose format is the same |
|
3777 | allow direct plotting of python strings whose format is the same | |
3772 | of gnuplot data files. |
|
3778 | of gnuplot data files. | |
3773 |
|
3779 | |||
3774 | 2002-12-16 Fernando Perez <fperez@colorado.edu> |
|
3780 | 2002-12-16 Fernando Perez <fperez@colorado.edu> | |
3775 |
|
3781 | |||
3776 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) |
|
3782 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) | |
3777 | value of exit question to be acknowledged. |
|
3783 | value of exit question to be acknowledged. | |
3778 |
|
3784 | |||
3779 | 2002-12-03 Fernando Perez <fperez@colorado.edu> |
|
3785 | 2002-12-03 Fernando Perez <fperez@colorado.edu> | |
3780 |
|
3786 | |||
3781 | * IPython/ipmaker.py: removed generators, which had been added |
|
3787 | * IPython/ipmaker.py: removed generators, which had been added | |
3782 | by mistake in an earlier debugging run. This was causing trouble |
|
3788 | by mistake in an earlier debugging run. This was causing trouble | |
3783 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> |
|
3789 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> | |
3784 | for pointing this out. |
|
3790 | for pointing this out. | |
3785 |
|
3791 | |||
3786 | 2002-11-17 Fernando Perez <fperez@colorado.edu> |
|
3792 | 2002-11-17 Fernando Perez <fperez@colorado.edu> | |
3787 |
|
3793 | |||
3788 | * Manual: updated the Gnuplot section. |
|
3794 | * Manual: updated the Gnuplot section. | |
3789 |
|
3795 | |||
3790 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with |
|
3796 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with | |
3791 | a much better split of what goes in Runtime and what goes in |
|
3797 | a much better split of what goes in Runtime and what goes in | |
3792 | Interactive. |
|
3798 | Interactive. | |
3793 |
|
3799 | |||
3794 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't |
|
3800 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't | |
3795 | being imported from iplib. |
|
3801 | being imported from iplib. | |
3796 |
|
3802 | |||
3797 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc |
|
3803 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc | |
3798 | for command-passing. Now the global Gnuplot instance is called |
|
3804 | for command-passing. Now the global Gnuplot instance is called | |
3799 | 'gp' instead of 'g', which was really a far too fragile and |
|
3805 | 'gp' instead of 'g', which was really a far too fragile and | |
3800 | common name. |
|
3806 | common name. | |
3801 |
|
3807 | |||
3802 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken |
|
3808 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken | |
3803 | bounding boxes generated by Gnuplot for square plots. |
|
3809 | bounding boxes generated by Gnuplot for square plots. | |
3804 |
|
3810 | |||
3805 | * IPython/genutils.py (popkey): new function added. I should |
|
3811 | * IPython/genutils.py (popkey): new function added. I should | |
3806 | suggest this on c.l.py as a dict method, it seems useful. |
|
3812 | suggest this on c.l.py as a dict method, it seems useful. | |
3807 |
|
3813 | |||
3808 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot |
|
3814 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot | |
3809 | to transparently handle PostScript generation. MUCH better than |
|
3815 | to transparently handle PostScript generation. MUCH better than | |
3810 | the previous plot_eps/replot_eps (which I removed now). The code |
|
3816 | the previous plot_eps/replot_eps (which I removed now). The code | |
3811 | is also fairly clean and well documented now (including |
|
3817 | is also fairly clean and well documented now (including | |
3812 | docstrings). |
|
3818 | docstrings). | |
3813 |
|
3819 | |||
3814 | 2002-11-13 Fernando Perez <fperez@colorado.edu> |
|
3820 | 2002-11-13 Fernando Perez <fperez@colorado.edu> | |
3815 |
|
3821 | |||
3816 | * IPython/Magic.py (Magic.magic_edit): fixed docstring |
|
3822 | * IPython/Magic.py (Magic.magic_edit): fixed docstring | |
3817 | (inconsistent with options). |
|
3823 | (inconsistent with options). | |
3818 |
|
3824 | |||
3819 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been |
|
3825 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been | |
3820 | manually disabled, I don't know why. Fixed it. |
|
3826 | manually disabled, I don't know why. Fixed it. | |
3821 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly |
|
3827 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly | |
3822 | eps output. |
|
3828 | eps output. | |
3823 |
|
3829 | |||
3824 | 2002-11-12 Fernando Perez <fperez@colorado.edu> |
|
3830 | 2002-11-12 Fernando Perez <fperez@colorado.edu> | |
3825 |
|
3831 | |||
3826 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they |
|
3832 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they | |
3827 | don't propagate up to caller. Fixes crash reported by François |
|
3833 | don't propagate up to caller. Fixes crash reported by François | |
3828 | Pinard. |
|
3834 | Pinard. | |
3829 |
|
3835 | |||
3830 | 2002-11-09 Fernando Perez <fperez@colorado.edu> |
|
3836 | 2002-11-09 Fernando Perez <fperez@colorado.edu> | |
3831 |
|
3837 | |||
3832 | * IPython/ipmaker.py (make_IPython): fixed problem with writing |
|
3838 | * IPython/ipmaker.py (make_IPython): fixed problem with writing | |
3833 | history file for new users. |
|
3839 | history file for new users. | |
3834 | (make_IPython): fixed bug where initial install would leave the |
|
3840 | (make_IPython): fixed bug where initial install would leave the | |
3835 | user running in the .ipython dir. |
|
3841 | user running in the .ipython dir. | |
3836 | (make_IPython): fixed bug where config dir .ipython would be |
|
3842 | (make_IPython): fixed bug where config dir .ipython would be | |
3837 | created regardless of the given -ipythondir option. Thanks to Cory |
|
3843 | created regardless of the given -ipythondir option. Thanks to Cory | |
3838 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. |
|
3844 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. | |
3839 |
|
3845 | |||
3840 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no |
|
3846 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no | |
3841 | type confirmations. Will need to use it in all of IPython's code |
|
3847 | type confirmations. Will need to use it in all of IPython's code | |
3842 | consistently. |
|
3848 | consistently. | |
3843 |
|
3849 | |||
3844 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the |
|
3850 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the | |
3845 | context to print 31 lines instead of the default 5. This will make |
|
3851 | context to print 31 lines instead of the default 5. This will make | |
3846 | the crash reports extremely detailed in case the problem is in |
|
3852 | the crash reports extremely detailed in case the problem is in | |
3847 | libraries I don't have access to. |
|
3853 | libraries I don't have access to. | |
3848 |
|
3854 | |||
3849 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last |
|
3855 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last | |
3850 | line of defense' code to still crash, but giving users fair |
|
3856 | line of defense' code to still crash, but giving users fair | |
3851 | warning. I don't want internal errors to go unreported: if there's |
|
3857 | warning. I don't want internal errors to go unreported: if there's | |
3852 | an internal problem, IPython should crash and generate a full |
|
3858 | an internal problem, IPython should crash and generate a full | |
3853 | report. |
|
3859 | report. | |
3854 |
|
3860 | |||
3855 | 2002-11-08 Fernando Perez <fperez@colorado.edu> |
|
3861 | 2002-11-08 Fernando Perez <fperez@colorado.edu> | |
3856 |
|
3862 | |||
3857 | * IPython/iplib.py (InteractiveShell.interact): added code to trap |
|
3863 | * IPython/iplib.py (InteractiveShell.interact): added code to trap | |
3858 | otherwise uncaught exceptions which can appear if people set |
|
3864 | otherwise uncaught exceptions which can appear if people set | |
3859 | sys.stdout to something badly broken. Thanks to a crash report |
|
3865 | sys.stdout to something badly broken. Thanks to a crash report | |
3860 | from henni-AT-mail.brainbot.com. |
|
3866 | from henni-AT-mail.brainbot.com. | |
3861 |
|
3867 | |||
3862 | 2002-11-04 Fernando Perez <fperez@colorado.edu> |
|
3868 | 2002-11-04 Fernando Perez <fperez@colorado.edu> | |
3863 |
|
3869 | |||
3864 | * IPython/iplib.py (InteractiveShell.interact): added |
|
3870 | * IPython/iplib.py (InteractiveShell.interact): added | |
3865 | __IPYTHON__active to the builtins. It's a flag which goes on when |
|
3871 | __IPYTHON__active to the builtins. It's a flag which goes on when | |
3866 | the interaction starts and goes off again when it stops. This |
|
3872 | the interaction starts and goes off again when it stops. This | |
3867 | allows embedding code to detect being inside IPython. Before this |
|
3873 | allows embedding code to detect being inside IPython. Before this | |
3868 | was done via __IPYTHON__, but that only shows that an IPython |
|
3874 | was done via __IPYTHON__, but that only shows that an IPython | |
3869 | instance has been created. |
|
3875 | instance has been created. | |
3870 |
|
3876 | |||
3871 | * IPython/Magic.py (Magic.magic_env): I realized that in a |
|
3877 | * IPython/Magic.py (Magic.magic_env): I realized that in a | |
3872 | UserDict, instance.data holds the data as a normal dict. So I |
|
3878 | UserDict, instance.data holds the data as a normal dict. So I | |
3873 | modified @env to return os.environ.data instead of rebuilding a |
|
3879 | modified @env to return os.environ.data instead of rebuilding a | |
3874 | dict by hand. |
|
3880 | dict by hand. | |
3875 |
|
3881 | |||
3876 | 2002-11-02 Fernando Perez <fperez@colorado.edu> |
|
3882 | 2002-11-02 Fernando Perez <fperez@colorado.edu> | |
3877 |
|
3883 | |||
3878 | * IPython/genutils.py (warn): changed so that level 1 prints no |
|
3884 | * IPython/genutils.py (warn): changed so that level 1 prints no | |
3879 | header. Level 2 is now the default (with 'WARNING' header, as |
|
3885 | header. Level 2 is now the default (with 'WARNING' header, as | |
3880 | before). I think I tracked all places where changes were needed in |
|
3886 | before). I think I tracked all places where changes were needed in | |
3881 | IPython, but outside code using the old level numbering may have |
|
3887 | IPython, but outside code using the old level numbering may have | |
3882 | broken. |
|
3888 | broken. | |
3883 |
|
3889 | |||
3884 | * IPython/iplib.py (InteractiveShell.runcode): added this to |
|
3890 | * IPython/iplib.py (InteractiveShell.runcode): added this to | |
3885 | handle the tracebacks in SystemExit traps correctly. The previous |
|
3891 | handle the tracebacks in SystemExit traps correctly. The previous | |
3886 | code (through interact) was printing more of the stack than |
|
3892 | code (through interact) was printing more of the stack than | |
3887 | necessary, showing IPython internal code to the user. |
|
3893 | necessary, showing IPython internal code to the user. | |
3888 |
|
3894 | |||
3889 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by |
|
3895 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by | |
3890 | default. Now that the default at the confirmation prompt is yes, |
|
3896 | default. Now that the default at the confirmation prompt is yes, | |
3891 | it's not so intrusive. François' argument that ipython sessions |
|
3897 | it's not so intrusive. François' argument that ipython sessions | |
3892 | tend to be complex enough not to lose them from an accidental C-d, |
|
3898 | tend to be complex enough not to lose them from an accidental C-d, | |
3893 | is a valid one. |
|
3899 | is a valid one. | |
3894 |
|
3900 | |||
3895 | * IPython/iplib.py (InteractiveShell.interact): added a |
|
3901 | * IPython/iplib.py (InteractiveShell.interact): added a | |
3896 | showtraceback() call to the SystemExit trap, and modified the exit |
|
3902 | showtraceback() call to the SystemExit trap, and modified the exit | |
3897 | confirmation to have yes as the default. |
|
3903 | confirmation to have yes as the default. | |
3898 |
|
3904 | |||
3899 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from |
|
3905 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from | |
3900 | this file. It's been gone from the code for a long time, this was |
|
3906 | this file. It's been gone from the code for a long time, this was | |
3901 | simply leftover junk. |
|
3907 | simply leftover junk. | |
3902 |
|
3908 | |||
3903 | 2002-11-01 Fernando Perez <fperez@colorado.edu> |
|
3909 | 2002-11-01 Fernando Perez <fperez@colorado.edu> | |
3904 |
|
3910 | |||
3905 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option |
|
3911 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option | |
3906 | added. If set, IPython now traps EOF and asks for |
|
3912 | added. If set, IPython now traps EOF and asks for | |
3907 | confirmation. After a request by François Pinard. |
|
3913 | confirmation. After a request by François Pinard. | |
3908 |
|
3914 | |||
3909 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead |
|
3915 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead | |
3910 | of @abort, and with a new (better) mechanism for handling the |
|
3916 | of @abort, and with a new (better) mechanism for handling the | |
3911 | exceptions. |
|
3917 | exceptions. | |
3912 |
|
3918 | |||
3913 | 2002-10-27 Fernando Perez <fperez@colorado.edu> |
|
3919 | 2002-10-27 Fernando Perez <fperez@colorado.edu> | |
3914 |
|
3920 | |||
3915 | * IPython/usage.py (__doc__): updated the --help information and |
|
3921 | * IPython/usage.py (__doc__): updated the --help information and | |
3916 | the ipythonrc file to indicate that -log generates |
|
3922 | the ipythonrc file to indicate that -log generates | |
3917 | ./ipython.log. Also fixed the corresponding info in @logstart. |
|
3923 | ./ipython.log. Also fixed the corresponding info in @logstart. | |
3918 | This and several other fixes in the manuals thanks to reports by |
|
3924 | This and several other fixes in the manuals thanks to reports by | |
3919 | François Pinard <pinard-AT-iro.umontreal.ca>. |
|
3925 | François Pinard <pinard-AT-iro.umontreal.ca>. | |
3920 |
|
3926 | |||
3921 | * IPython/Logger.py (Logger.switch_log): Fixed error message to |
|
3927 | * IPython/Logger.py (Logger.switch_log): Fixed error message to | |
3922 | refer to @logstart (instead of @log, which doesn't exist). |
|
3928 | refer to @logstart (instead of @log, which doesn't exist). | |
3923 |
|
3929 | |||
3924 | * IPython/iplib.py (InteractiveShell._prefilter): fixed |
|
3930 | * IPython/iplib.py (InteractiveShell._prefilter): fixed | |
3925 | AttributeError crash. Thanks to Christopher Armstrong |
|
3931 | AttributeError crash. Thanks to Christopher Armstrong | |
3926 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been |
|
3932 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been | |
3927 | introduced recently (in 0.2.14pre37) with the fix to the eval |
|
3933 | introduced recently (in 0.2.14pre37) with the fix to the eval | |
3928 | problem mentioned below. |
|
3934 | problem mentioned below. | |
3929 |
|
3935 | |||
3930 | 2002-10-17 Fernando Perez <fperez@colorado.edu> |
|
3936 | 2002-10-17 Fernando Perez <fperez@colorado.edu> | |
3931 |
|
3937 | |||
3932 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows |
|
3938 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows | |
3933 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. |
|
3939 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. | |
3934 |
|
3940 | |||
3935 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to |
|
3941 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to | |
3936 | this function to fix a problem reported by Alex Schmolck. He saw |
|
3942 | this function to fix a problem reported by Alex Schmolck. He saw | |
3937 | it with list comprehensions and generators, which were getting |
|
3943 | it with list comprehensions and generators, which were getting | |
3938 | called twice. The real problem was an 'eval' call in testing for |
|
3944 | called twice. The real problem was an 'eval' call in testing for | |
3939 | automagic which was evaluating the input line silently. |
|
3945 | automagic which was evaluating the input line silently. | |
3940 |
|
3946 | |||
3941 | This is a potentially very nasty bug, if the input has side |
|
3947 | This is a potentially very nasty bug, if the input has side | |
3942 | effects which must not be repeated. The code is much cleaner now, |
|
3948 | effects which must not be repeated. The code is much cleaner now, | |
3943 | without any blanket 'except' left and with a regexp test for |
|
3949 | without any blanket 'except' left and with a regexp test for | |
3944 | actual function names. |
|
3950 | actual function names. | |
3945 |
|
3951 | |||
3946 | But an eval remains, which I'm not fully comfortable with. I just |
|
3952 | But an eval remains, which I'm not fully comfortable with. I just | |
3947 | don't know how to find out if an expression could be a callable in |
|
3953 | don't know how to find out if an expression could be a callable in | |
3948 | the user's namespace without doing an eval on the string. However |
|
3954 | the user's namespace without doing an eval on the string. However | |
3949 | that string is now much more strictly checked so that no code |
|
3955 | that string is now much more strictly checked so that no code | |
3950 | slips by, so the eval should only happen for things that can |
|
3956 | slips by, so the eval should only happen for things that can | |
3951 | really be only function/method names. |
|
3957 | really be only function/method names. | |
3952 |
|
3958 | |||
3953 | 2002-10-15 Fernando Perez <fperez@colorado.edu> |
|
3959 | 2002-10-15 Fernando Perez <fperez@colorado.edu> | |
3954 |
|
3960 | |||
3955 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac |
|
3961 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac | |
3956 | OSX information to main manual, removed README_Mac_OSX file from |
|
3962 | OSX information to main manual, removed README_Mac_OSX file from | |
3957 | distribution. Also updated credits for recent additions. |
|
3963 | distribution. Also updated credits for recent additions. | |
3958 |
|
3964 | |||
3959 | 2002-10-10 Fernando Perez <fperez@colorado.edu> |
|
3965 | 2002-10-10 Fernando Perez <fperez@colorado.edu> | |
3960 |
|
3966 | |||
3961 | * README_Mac_OSX: Added a README for Mac OSX users for fixing |
|
3967 | * README_Mac_OSX: Added a README for Mac OSX users for fixing | |
3962 | terminal-related issues. Many thanks to Andrea Riciputi |
|
3968 | terminal-related issues. Many thanks to Andrea Riciputi | |
3963 | <andrea.riciputi-AT-libero.it> for writing it. |
|
3969 | <andrea.riciputi-AT-libero.it> for writing it. | |
3964 |
|
3970 | |||
3965 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, |
|
3971 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, | |
3966 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
3972 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
3967 |
|
3973 | |||
3968 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks |
|
3974 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks | |
3969 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad |
|
3975 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad | |
3970 | <syver-en-AT-online.no> who both submitted patches for this problem. |
|
3976 | <syver-en-AT-online.no> who both submitted patches for this problem. | |
3971 |
|
3977 | |||
3972 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for |
|
3978 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for | |
3973 | global embedding to make sure that things don't overwrite user |
|
3979 | global embedding to make sure that things don't overwrite user | |
3974 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> |
|
3980 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> | |
3975 |
|
3981 | |||
3976 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 |
|
3982 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 | |
3977 | compatibility. Thanks to Hayden Callow |
|
3983 | compatibility. Thanks to Hayden Callow | |
3978 | <h.callow-AT-elec.canterbury.ac.nz> |
|
3984 | <h.callow-AT-elec.canterbury.ac.nz> | |
3979 |
|
3985 | |||
3980 | 2002-10-04 Fernando Perez <fperez@colorado.edu> |
|
3986 | 2002-10-04 Fernando Perez <fperez@colorado.edu> | |
3981 |
|
3987 | |||
3982 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for |
|
3988 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for | |
3983 | Gnuplot.File objects. |
|
3989 | Gnuplot.File objects. | |
3984 |
|
3990 | |||
3985 | 2002-07-23 Fernando Perez <fperez@colorado.edu> |
|
3991 | 2002-07-23 Fernando Perez <fperez@colorado.edu> | |
3986 |
|
3992 | |||
3987 | * IPython/genutils.py (timing): Added timings() and timing() for |
|
3993 | * IPython/genutils.py (timing): Added timings() and timing() for | |
3988 | quick access to the most commonly needed data, the execution |
|
3994 | quick access to the most commonly needed data, the execution | |
3989 | times. Old timing() renamed to timings_out(). |
|
3995 | times. Old timing() renamed to timings_out(). | |
3990 |
|
3996 | |||
3991 | 2002-07-18 Fernando Perez <fperez@colorado.edu> |
|
3997 | 2002-07-18 Fernando Perez <fperez@colorado.edu> | |
3992 |
|
3998 | |||
3993 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed |
|
3999 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed | |
3994 | bug with nested instances disrupting the parent's tab completion. |
|
4000 | bug with nested instances disrupting the parent's tab completion. | |
3995 |
|
4001 | |||
3996 | * IPython/iplib.py (all_completions): Added Alex Schmolck's |
|
4002 | * IPython/iplib.py (all_completions): Added Alex Schmolck's | |
3997 | all_completions code to begin the emacs integration. |
|
4003 | all_completions code to begin the emacs integration. | |
3998 |
|
4004 | |||
3999 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' |
|
4005 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' | |
4000 | argument to allow titling individual arrays when plotting. |
|
4006 | argument to allow titling individual arrays when plotting. | |
4001 |
|
4007 | |||
4002 | 2002-07-15 Fernando Perez <fperez@colorado.edu> |
|
4008 | 2002-07-15 Fernando Perez <fperez@colorado.edu> | |
4003 |
|
4009 | |||
4004 | * setup.py (make_shortcut): changed to retrieve the value of |
|
4010 | * setup.py (make_shortcut): changed to retrieve the value of | |
4005 | 'Program Files' directory from the registry (this value changes in |
|
4011 | 'Program Files' directory from the registry (this value changes in | |
4006 | non-english versions of Windows). Thanks to Thomas Fanslau |
|
4012 | non-english versions of Windows). Thanks to Thomas Fanslau | |
4007 | <tfanslau-AT-gmx.de> for the report. |
|
4013 | <tfanslau-AT-gmx.de> for the report. | |
4008 |
|
4014 | |||
4009 | 2002-07-10 Fernando Perez <fperez@colorado.edu> |
|
4015 | 2002-07-10 Fernando Perez <fperez@colorado.edu> | |
4010 |
|
4016 | |||
4011 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for |
|
4017 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for | |
4012 | a bug in pdb, which crashes if a line with only whitespace is |
|
4018 | a bug in pdb, which crashes if a line with only whitespace is | |
4013 | entered. Bug report submitted to sourceforge. |
|
4019 | entered. Bug report submitted to sourceforge. | |
4014 |
|
4020 | |||
4015 | 2002-07-09 Fernando Perez <fperez@colorado.edu> |
|
4021 | 2002-07-09 Fernando Perez <fperez@colorado.edu> | |
4016 |
|
4022 | |||
4017 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when |
|
4023 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when | |
4018 | reporting exceptions (it's a bug in inspect.py, I just set a |
|
4024 | reporting exceptions (it's a bug in inspect.py, I just set a | |
4019 | workaround). |
|
4025 | workaround). | |
4020 |
|
4026 | |||
4021 | 2002-07-08 Fernando Perez <fperez@colorado.edu> |
|
4027 | 2002-07-08 Fernando Perez <fperez@colorado.edu> | |
4022 |
|
4028 | |||
4023 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to |
|
4029 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to | |
4024 | __IPYTHON__ in __builtins__ to show up in user_ns. |
|
4030 | __IPYTHON__ in __builtins__ to show up in user_ns. | |
4025 |
|
4031 | |||
4026 | 2002-07-03 Fernando Perez <fperez@colorado.edu> |
|
4032 | 2002-07-03 Fernando Perez <fperez@colorado.edu> | |
4027 |
|
4033 | |||
4028 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed |
|
4034 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed | |
4029 | name from @gp_set_instance to @gp_set_default. |
|
4035 | name from @gp_set_instance to @gp_set_default. | |
4030 |
|
4036 | |||
4031 | * IPython/ipmaker.py (make_IPython): default editor value set to |
|
4037 | * IPython/ipmaker.py (make_IPython): default editor value set to | |
4032 | '0' (a string), to match the rc file. Otherwise will crash when |
|
4038 | '0' (a string), to match the rc file. Otherwise will crash when | |
4033 | .strip() is called on it. |
|
4039 | .strip() is called on it. | |
4034 |
|
4040 | |||
4035 |
|
4041 | |||
4036 | 2002-06-28 Fernando Perez <fperez@colorado.edu> |
|
4042 | 2002-06-28 Fernando Perez <fperez@colorado.edu> | |
4037 |
|
4043 | |||
4038 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing |
|
4044 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing | |
4039 | of files in current directory when a file is executed via |
|
4045 | of files in current directory when a file is executed via | |
4040 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. |
|
4046 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. | |
4041 |
|
4047 | |||
4042 | * setup.py (manfiles): fix for rpm builds, submitted by RA |
|
4048 | * setup.py (manfiles): fix for rpm builds, submitted by RA | |
4043 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! |
|
4049 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! | |
4044 |
|
4050 | |||
4045 | * IPython/ipmaker.py (make_IPython): fixed lookup of default |
|
4051 | * IPython/ipmaker.py (make_IPython): fixed lookup of default | |
4046 | editor when set to '0'. Problem was, '0' evaluates to True (it's a |
|
4052 | editor when set to '0'. Problem was, '0' evaluates to True (it's a | |
4047 | string!). A. Schmolck caught this one. |
|
4053 | string!). A. Schmolck caught this one. | |
4048 |
|
4054 | |||
4049 | 2002-06-27 Fernando Perez <fperez@colorado.edu> |
|
4055 | 2002-06-27 Fernando Perez <fperez@colorado.edu> | |
4050 |
|
4056 | |||
4051 | * IPython/ipmaker.py (make_IPython): fixed bug when running user |
|
4057 | * IPython/ipmaker.py (make_IPython): fixed bug when running user | |
4052 | defined files at the cmd line. __name__ wasn't being set to |
|
4058 | defined files at the cmd line. __name__ wasn't being set to | |
4053 | __main__. |
|
4059 | __main__. | |
4054 |
|
4060 | |||
4055 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also |
|
4061 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also | |
4056 | regular lists and tuples besides Numeric arrays. |
|
4062 | regular lists and tuples besides Numeric arrays. | |
4057 |
|
4063 | |||
4058 | * IPython/Prompts.py (CachedOutput.__call__): Added output |
|
4064 | * IPython/Prompts.py (CachedOutput.__call__): Added output | |
4059 | supression for input ending with ';'. Similar to Mathematica and |
|
4065 | supression for input ending with ';'. Similar to Mathematica and | |
4060 | Matlab. The _* vars and Out[] list are still updated, just like |
|
4066 | Matlab. The _* vars and Out[] list are still updated, just like | |
4061 | Mathematica behaves. |
|
4067 | Mathematica behaves. | |
4062 |
|
4068 | |||
4063 | 2002-06-25 Fernando Perez <fperez@colorado.edu> |
|
4069 | 2002-06-25 Fernando Perez <fperez@colorado.edu> | |
4064 |
|
4070 | |||
4065 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of |
|
4071 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of | |
4066 | .ini extensions for profiels under Windows. |
|
4072 | .ini extensions for profiels under Windows. | |
4067 |
|
4073 | |||
4068 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of |
|
4074 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of | |
4069 | string form. Fix contributed by Alexander Schmolck |
|
4075 | string form. Fix contributed by Alexander Schmolck | |
4070 | <a.schmolck-AT-gmx.net> |
|
4076 | <a.schmolck-AT-gmx.net> | |
4071 |
|
4077 | |||
4072 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a |
|
4078 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a | |
4073 | pre-configured Gnuplot instance. |
|
4079 | pre-configured Gnuplot instance. | |
4074 |
|
4080 | |||
4075 | 2002-06-21 Fernando Perez <fperez@colorado.edu> |
|
4081 | 2002-06-21 Fernando Perez <fperez@colorado.edu> | |
4076 |
|
4082 | |||
4077 | * IPython/numutils.py (exp_safe): new function, works around the |
|
4083 | * IPython/numutils.py (exp_safe): new function, works around the | |
4078 | underflow problems in Numeric. |
|
4084 | underflow problems in Numeric. | |
4079 | (log2): New fn. Safe log in base 2: returns exact integer answer |
|
4085 | (log2): New fn. Safe log in base 2: returns exact integer answer | |
4080 | for exact integer powers of 2. |
|
4086 | for exact integer powers of 2. | |
4081 |
|
4087 | |||
4082 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' |
|
4088 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' | |
4083 | properly. |
|
4089 | properly. | |
4084 |
|
4090 | |||
4085 | 2002-06-20 Fernando Perez <fperez@colorado.edu> |
|
4091 | 2002-06-20 Fernando Perez <fperez@colorado.edu> | |
4086 |
|
4092 | |||
4087 | * IPython/genutils.py (timing): new function like |
|
4093 | * IPython/genutils.py (timing): new function like | |
4088 | Mathematica's. Similar to time_test, but returns more info. |
|
4094 | Mathematica's. Similar to time_test, but returns more info. | |
4089 |
|
4095 | |||
4090 | 2002-06-18 Fernando Perez <fperez@colorado.edu> |
|
4096 | 2002-06-18 Fernando Perez <fperez@colorado.edu> | |
4091 |
|
4097 | |||
4092 | * IPython/Magic.py (Magic.magic_save): modified @save and @r |
|
4098 | * IPython/Magic.py (Magic.magic_save): modified @save and @r | |
4093 | according to Mike Heeter's suggestions. |
|
4099 | according to Mike Heeter's suggestions. | |
4094 |
|
4100 | |||
4095 | 2002-06-16 Fernando Perez <fperez@colorado.edu> |
|
4101 | 2002-06-16 Fernando Perez <fperez@colorado.edu> | |
4096 |
|
4102 | |||
4097 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot |
|
4103 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot | |
4098 | system. GnuplotMagic is gone as a user-directory option. New files |
|
4104 | system. GnuplotMagic is gone as a user-directory option. New files | |
4099 | make it easier to use all the gnuplot stuff both from external |
|
4105 | make it easier to use all the gnuplot stuff both from external | |
4100 | programs as well as from IPython. Had to rewrite part of |
|
4106 | programs as well as from IPython. Had to rewrite part of | |
4101 | hardcopy() b/c of a strange bug: often the ps files simply don't |
|
4107 | hardcopy() b/c of a strange bug: often the ps files simply don't | |
4102 | get created, and require a repeat of the command (often several |
|
4108 | get created, and require a repeat of the command (often several | |
4103 | times). |
|
4109 | times). | |
4104 |
|
4110 | |||
4105 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to |
|
4111 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to | |
4106 | resolve output channel at call time, so that if sys.stderr has |
|
4112 | resolve output channel at call time, so that if sys.stderr has | |
4107 | been redirected by user this gets honored. |
|
4113 | been redirected by user this gets honored. | |
4108 |
|
4114 | |||
4109 | 2002-06-13 Fernando Perez <fperez@colorado.edu> |
|
4115 | 2002-06-13 Fernando Perez <fperez@colorado.edu> | |
4110 |
|
4116 | |||
4111 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to |
|
4117 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to | |
4112 | IPShell. Kept a copy with the old names to avoid breaking people's |
|
4118 | IPShell. Kept a copy with the old names to avoid breaking people's | |
4113 | embedded code. |
|
4119 | embedded code. | |
4114 |
|
4120 | |||
4115 | * IPython/ipython: simplified it to the bare minimum after |
|
4121 | * IPython/ipython: simplified it to the bare minimum after | |
4116 | Holger's suggestions. Added info about how to use it in |
|
4122 | Holger's suggestions. Added info about how to use it in | |
4117 | PYTHONSTARTUP. |
|
4123 | PYTHONSTARTUP. | |
4118 |
|
4124 | |||
4119 | * IPython/Shell.py (IPythonShell): changed the options passing |
|
4125 | * IPython/Shell.py (IPythonShell): changed the options passing | |
4120 | from a string with funky %s replacements to a straight list. Maybe |
|
4126 | from a string with funky %s replacements to a straight list. Maybe | |
4121 | a bit more typing, but it follows sys.argv conventions, so there's |
|
4127 | a bit more typing, but it follows sys.argv conventions, so there's | |
4122 | less special-casing to remember. |
|
4128 | less special-casing to remember. | |
4123 |
|
4129 | |||
4124 | 2002-06-12 Fernando Perez <fperez@colorado.edu> |
|
4130 | 2002-06-12 Fernando Perez <fperez@colorado.edu> | |
4125 |
|
4131 | |||
4126 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat |
|
4132 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat | |
4127 | command. Thanks to a suggestion by Mike Heeter. |
|
4133 | command. Thanks to a suggestion by Mike Heeter. | |
4128 | (Magic.magic_pfile): added behavior to look at filenames if given |
|
4134 | (Magic.magic_pfile): added behavior to look at filenames if given | |
4129 | arg is not a defined object. |
|
4135 | arg is not a defined object. | |
4130 | (Magic.magic_save): New @save function to save code snippets. Also |
|
4136 | (Magic.magic_save): New @save function to save code snippets. Also | |
4131 | a Mike Heeter idea. |
|
4137 | a Mike Heeter idea. | |
4132 |
|
4138 | |||
4133 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to |
|
4139 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to | |
4134 | plot() and replot(). Much more convenient now, especially for |
|
4140 | plot() and replot(). Much more convenient now, especially for | |
4135 | interactive use. |
|
4141 | interactive use. | |
4136 |
|
4142 | |||
4137 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to |
|
4143 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to | |
4138 | filenames. |
|
4144 | filenames. | |
4139 |
|
4145 | |||
4140 | 2002-06-02 Fernando Perez <fperez@colorado.edu> |
|
4146 | 2002-06-02 Fernando Perez <fperez@colorado.edu> | |
4141 |
|
4147 | |||
4142 | * IPython/Struct.py (Struct.__init__): modified to admit |
|
4148 | * IPython/Struct.py (Struct.__init__): modified to admit | |
4143 | initialization via another struct. |
|
4149 | initialization via another struct. | |
4144 |
|
4150 | |||
4145 | * IPython/genutils.py (SystemExec.__init__): New stateful |
|
4151 | * IPython/genutils.py (SystemExec.__init__): New stateful | |
4146 | interface to xsys and bq. Useful for writing system scripts. |
|
4152 | interface to xsys and bq. Useful for writing system scripts. | |
4147 |
|
4153 | |||
4148 | 2002-05-30 Fernando Perez <fperez@colorado.edu> |
|
4154 | 2002-05-30 Fernando Perez <fperez@colorado.edu> | |
4149 |
|
4155 | |||
4150 | * MANIFEST.in: Changed docfile selection to exclude all the lyx |
|
4156 | * MANIFEST.in: Changed docfile selection to exclude all the lyx | |
4151 | documents. This will make the user download smaller (it's getting |
|
4157 | documents. This will make the user download smaller (it's getting | |
4152 | too big). |
|
4158 | too big). | |
4153 |
|
4159 | |||
4154 | 2002-05-29 Fernando Perez <fperez@colorado.edu> |
|
4160 | 2002-05-29 Fernando Perez <fperez@colorado.edu> | |
4155 |
|
4161 | |||
4156 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to |
|
4162 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to | |
4157 | fix problems with shelve and pickle. Seems to work, but I don't |
|
4163 | fix problems with shelve and pickle. Seems to work, but I don't | |
4158 | know if corner cases break it. Thanks to Mike Heeter |
|
4164 | know if corner cases break it. Thanks to Mike Heeter | |
4159 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. |
|
4165 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. | |
4160 |
|
4166 | |||
4161 | 2002-05-24 Fernando Perez <fperez@colorado.edu> |
|
4167 | 2002-05-24 Fernando Perez <fperez@colorado.edu> | |
4162 |
|
4168 | |||
4163 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in |
|
4169 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in | |
4164 | macros having broken. |
|
4170 | macros having broken. | |
4165 |
|
4171 | |||
4166 | 2002-05-21 Fernando Perez <fperez@colorado.edu> |
|
4172 | 2002-05-21 Fernando Perez <fperez@colorado.edu> | |
4167 |
|
4173 | |||
4168 | * IPython/Magic.py (Magic.magic_logstart): fixed recently |
|
4174 | * IPython/Magic.py (Magic.magic_logstart): fixed recently | |
4169 | introduced logging bug: all history before logging started was |
|
4175 | introduced logging bug: all history before logging started was | |
4170 | being written one character per line! This came from the redesign |
|
4176 | being written one character per line! This came from the redesign | |
4171 | of the input history as a special list which slices to strings, |
|
4177 | of the input history as a special list which slices to strings, | |
4172 | not to lists. |
|
4178 | not to lists. | |
4173 |
|
4179 | |||
4174 | 2002-05-20 Fernando Perez <fperez@colorado.edu> |
|
4180 | 2002-05-20 Fernando Perez <fperez@colorado.edu> | |
4175 |
|
4181 | |||
4176 | * IPython/Prompts.py (CachedOutput.__init__): made the color table |
|
4182 | * IPython/Prompts.py (CachedOutput.__init__): made the color table | |
4177 | be an attribute of all classes in this module. The design of these |
|
4183 | be an attribute of all classes in this module. The design of these | |
4178 | classes needs some serious overhauling. |
|
4184 | classes needs some serious overhauling. | |
4179 |
|
4185 | |||
4180 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug |
|
4186 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug | |
4181 | which was ignoring '_' in option names. |
|
4187 | which was ignoring '_' in option names. | |
4182 |
|
4188 | |||
4183 | * IPython/ultraTB.py (FormattedTB.__init__): Changed |
|
4189 | * IPython/ultraTB.py (FormattedTB.__init__): Changed | |
4184 | 'Verbose_novars' to 'Context' and made it the new default. It's a |
|
4190 | 'Verbose_novars' to 'Context' and made it the new default. It's a | |
4185 | bit more readable and also safer than verbose. |
|
4191 | bit more readable and also safer than verbose. | |
4186 |
|
4192 | |||
4187 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of |
|
4193 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of | |
4188 | triple-quoted strings. |
|
4194 | triple-quoted strings. | |
4189 |
|
4195 | |||
4190 | * IPython/OInspect.py (__all__): new module exposing the object |
|
4196 | * IPython/OInspect.py (__all__): new module exposing the object | |
4191 | introspection facilities. Now the corresponding magics are dummy |
|
4197 | introspection facilities. Now the corresponding magics are dummy | |
4192 | wrappers around this. Having this module will make it much easier |
|
4198 | wrappers around this. Having this module will make it much easier | |
4193 | to put these functions into our modified pdb. |
|
4199 | to put these functions into our modified pdb. | |
4194 | This new object inspector system uses the new colorizing module, |
|
4200 | This new object inspector system uses the new colorizing module, | |
4195 | so source code and other things are nicely syntax highlighted. |
|
4201 | so source code and other things are nicely syntax highlighted. | |
4196 |
|
4202 | |||
4197 | 2002-05-18 Fernando Perez <fperez@colorado.edu> |
|
4203 | 2002-05-18 Fernando Perez <fperez@colorado.edu> | |
4198 |
|
4204 | |||
4199 | * IPython/ColorANSI.py: Split the coloring tools into a separate |
|
4205 | * IPython/ColorANSI.py: Split the coloring tools into a separate | |
4200 | module so I can use them in other code easier (they were part of |
|
4206 | module so I can use them in other code easier (they were part of | |
4201 | ultraTB). |
|
4207 | ultraTB). | |
4202 |
|
4208 | |||
4203 | 2002-05-17 Fernando Perez <fperez@colorado.edu> |
|
4209 | 2002-05-17 Fernando Perez <fperez@colorado.edu> | |
4204 |
|
4210 | |||
4205 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
4211 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
4206 | fixed it to set the global 'g' also to the called instance, as |
|
4212 | fixed it to set the global 'g' also to the called instance, as | |
4207 | long as 'g' was still a gnuplot instance (so it doesn't overwrite |
|
4213 | long as 'g' was still a gnuplot instance (so it doesn't overwrite | |
4208 | user's 'g' variables). |
|
4214 | user's 'g' variables). | |
4209 |
|
4215 | |||
4210 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out |
|
4216 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out | |
4211 | global variables (aliases to _ih,_oh) so that users which expect |
|
4217 | global variables (aliases to _ih,_oh) so that users which expect | |
4212 | In[5] or Out[7] to work aren't unpleasantly surprised. |
|
4218 | In[5] or Out[7] to work aren't unpleasantly surprised. | |
4213 | (InputList.__getslice__): new class to allow executing slices of |
|
4219 | (InputList.__getslice__): new class to allow executing slices of | |
4214 | input history directly. Very simple class, complements the use of |
|
4220 | input history directly. Very simple class, complements the use of | |
4215 | macros. |
|
4221 | macros. | |
4216 |
|
4222 | |||
4217 | 2002-05-16 Fernando Perez <fperez@colorado.edu> |
|
4223 | 2002-05-16 Fernando Perez <fperez@colorado.edu> | |
4218 |
|
4224 | |||
4219 | * setup.py (docdirbase): make doc directory be just doc/IPython |
|
4225 | * setup.py (docdirbase): make doc directory be just doc/IPython | |
4220 | without version numbers, it will reduce clutter for users. |
|
4226 | without version numbers, it will reduce clutter for users. | |
4221 |
|
4227 | |||
4222 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to |
|
4228 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to | |
4223 | execfile call to prevent possible memory leak. See for details: |
|
4229 | execfile call to prevent possible memory leak. See for details: | |
4224 | http://mail.python.org/pipermail/python-list/2002-February/088476.html |
|
4230 | http://mail.python.org/pipermail/python-list/2002-February/088476.html | |
4225 |
|
4231 | |||
4226 | 2002-05-15 Fernando Perez <fperez@colorado.edu> |
|
4232 | 2002-05-15 Fernando Perez <fperez@colorado.edu> | |
4227 |
|
4233 | |||
4228 | * IPython/Magic.py (Magic.magic_psource): made the object |
|
4234 | * IPython/Magic.py (Magic.magic_psource): made the object | |
4229 | introspection names be more standard: pdoc, pdef, pfile and |
|
4235 | introspection names be more standard: pdoc, pdef, pfile and | |
4230 | psource. They all print/page their output, and it makes |
|
4236 | psource. They all print/page their output, and it makes | |
4231 | remembering them easier. Kept old names for compatibility as |
|
4237 | remembering them easier. Kept old names for compatibility as | |
4232 | aliases. |
|
4238 | aliases. | |
4233 |
|
4239 | |||
4234 | 2002-05-14 Fernando Perez <fperez@colorado.edu> |
|
4240 | 2002-05-14 Fernando Perez <fperez@colorado.edu> | |
4235 |
|
4241 | |||
4236 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood |
|
4242 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood | |
4237 | what the mouse problem was. The trick is to use gnuplot with temp |
|
4243 | what the mouse problem was. The trick is to use gnuplot with temp | |
4238 | files and NOT with pipes (for data communication), because having |
|
4244 | files and NOT with pipes (for data communication), because having | |
4239 | both pipes and the mouse on is bad news. |
|
4245 | both pipes and the mouse on is bad news. | |
4240 |
|
4246 | |||
4241 | 2002-05-13 Fernando Perez <fperez@colorado.edu> |
|
4247 | 2002-05-13 Fernando Perez <fperez@colorado.edu> | |
4242 |
|
4248 | |||
4243 | * IPython/Magic.py (Magic._ofind): fixed namespace order search |
|
4249 | * IPython/Magic.py (Magic._ofind): fixed namespace order search | |
4244 | bug. Information would be reported about builtins even when |
|
4250 | bug. Information would be reported about builtins even when | |
4245 | user-defined functions overrode them. |
|
4251 | user-defined functions overrode them. | |
4246 |
|
4252 | |||
4247 | 2002-05-11 Fernando Perez <fperez@colorado.edu> |
|
4253 | 2002-05-11 Fernando Perez <fperez@colorado.edu> | |
4248 |
|
4254 | |||
4249 | * IPython/__init__.py (__all__): removed FlexCompleter from |
|
4255 | * IPython/__init__.py (__all__): removed FlexCompleter from | |
4250 | __all__ so that things don't fail in platforms without readline. |
|
4256 | __all__ so that things don't fail in platforms without readline. | |
4251 |
|
4257 | |||
4252 | 2002-05-10 Fernando Perez <fperez@colorado.edu> |
|
4258 | 2002-05-10 Fernando Perez <fperez@colorado.edu> | |
4253 |
|
4259 | |||
4254 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c |
|
4260 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c | |
4255 | it requires Numeric, effectively making Numeric a dependency for |
|
4261 | it requires Numeric, effectively making Numeric a dependency for | |
4256 | IPython. |
|
4262 | IPython. | |
4257 |
|
4263 | |||
4258 | * Released 0.2.13 |
|
4264 | * Released 0.2.13 | |
4259 |
|
4265 | |||
4260 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the |
|
4266 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the | |
4261 | profiler interface. Now all the major options from the profiler |
|
4267 | profiler interface. Now all the major options from the profiler | |
4262 | module are directly supported in IPython, both for single |
|
4268 | module are directly supported in IPython, both for single | |
4263 | expressions (@prun) and for full programs (@run -p). |
|
4269 | expressions (@prun) and for full programs (@run -p). | |
4264 |
|
4270 | |||
4265 | 2002-05-09 Fernando Perez <fperez@colorado.edu> |
|
4271 | 2002-05-09 Fernando Perez <fperez@colorado.edu> | |
4266 |
|
4272 | |||
4267 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of |
|
4273 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of | |
4268 | magic properly formatted for screen. |
|
4274 | magic properly formatted for screen. | |
4269 |
|
4275 | |||
4270 | * setup.py (make_shortcut): Changed things to put pdf version in |
|
4276 | * setup.py (make_shortcut): Changed things to put pdf version in | |
4271 | doc/ instead of doc/manual (had to change lyxport a bit). |
|
4277 | doc/ instead of doc/manual (had to change lyxport a bit). | |
4272 |
|
4278 | |||
4273 | * IPython/Magic.py (Profile.string_stats): made profile runs go |
|
4279 | * IPython/Magic.py (Profile.string_stats): made profile runs go | |
4274 | through pager (they are long and a pager allows searching, saving, |
|
4280 | through pager (they are long and a pager allows searching, saving, | |
4275 | etc.) |
|
4281 | etc.) | |
4276 |
|
4282 | |||
4277 | 2002-05-08 Fernando Perez <fperez@colorado.edu> |
|
4283 | 2002-05-08 Fernando Perez <fperez@colorado.edu> | |
4278 |
|
4284 | |||
4279 | * Released 0.2.12 |
|
4285 | * Released 0.2.12 | |
4280 |
|
4286 | |||
4281 | 2002-05-06 Fernando Perez <fperez@colorado.edu> |
|
4287 | 2002-05-06 Fernando Perez <fperez@colorado.edu> | |
4282 |
|
4288 | |||
4283 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently |
|
4289 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently | |
4284 | introduced); 'hist n1 n2' was broken. |
|
4290 | introduced); 'hist n1 n2' was broken. | |
4285 | (Magic.magic_pdb): added optional on/off arguments to @pdb |
|
4291 | (Magic.magic_pdb): added optional on/off arguments to @pdb | |
4286 | (Magic.magic_run): added option -i to @run, which executes code in |
|
4292 | (Magic.magic_run): added option -i to @run, which executes code in | |
4287 | the IPython namespace instead of a clean one. Also added @irun as |
|
4293 | the IPython namespace instead of a clean one. Also added @irun as | |
4288 | an alias to @run -i. |
|
4294 | an alias to @run -i. | |
4289 |
|
4295 | |||
4290 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
4296 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
4291 | fixed (it didn't really do anything, the namespaces were wrong). |
|
4297 | fixed (it didn't really do anything, the namespaces were wrong). | |
4292 |
|
4298 | |||
4293 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 |
|
4299 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 | |
4294 |
|
4300 | |||
4295 | * IPython/__init__.py (__all__): Fixed package namespace, now |
|
4301 | * IPython/__init__.py (__all__): Fixed package namespace, now | |
4296 | 'import IPython' does give access to IPython.<all> as |
|
4302 | 'import IPython' does give access to IPython.<all> as | |
4297 | expected. Also renamed __release__ to Release. |
|
4303 | expected. Also renamed __release__ to Release. | |
4298 |
|
4304 | |||
4299 | * IPython/Debugger.py (__license__): created new Pdb class which |
|
4305 | * IPython/Debugger.py (__license__): created new Pdb class which | |
4300 | functions like a drop-in for the normal pdb.Pdb but does NOT |
|
4306 | functions like a drop-in for the normal pdb.Pdb but does NOT | |
4301 | import readline by default. This way it doesn't muck up IPython's |
|
4307 | import readline by default. This way it doesn't muck up IPython's | |
4302 | readline handling, and now tab-completion finally works in the |
|
4308 | readline handling, and now tab-completion finally works in the | |
4303 | debugger -- sort of. It completes things globally visible, but the |
|
4309 | debugger -- sort of. It completes things globally visible, but the | |
4304 | completer doesn't track the stack as pdb walks it. That's a bit |
|
4310 | completer doesn't track the stack as pdb walks it. That's a bit | |
4305 | tricky, and I'll have to implement it later. |
|
4311 | tricky, and I'll have to implement it later. | |
4306 |
|
4312 | |||
4307 | 2002-05-05 Fernando Perez <fperez@colorado.edu> |
|
4313 | 2002-05-05 Fernando Perez <fperez@colorado.edu> | |
4308 |
|
4314 | |||
4309 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for |
|
4315 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for | |
4310 | magic docstrings when printed via ? (explicit \'s were being |
|
4316 | magic docstrings when printed via ? (explicit \'s were being | |
4311 | printed). |
|
4317 | printed). | |
4312 |
|
4318 | |||
4313 | * IPython/ipmaker.py (make_IPython): fixed namespace |
|
4319 | * IPython/ipmaker.py (make_IPython): fixed namespace | |
4314 | identification bug. Now variables loaded via logs or command-line |
|
4320 | identification bug. Now variables loaded via logs or command-line | |
4315 | files are recognized in the interactive namespace by @who. |
|
4321 | files are recognized in the interactive namespace by @who. | |
4316 |
|
4322 | |||
4317 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in |
|
4323 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in | |
4318 | log replay system stemming from the string form of Structs. |
|
4324 | log replay system stemming from the string form of Structs. | |
4319 |
|
4325 | |||
4320 | * IPython/Magic.py (Macro.__init__): improved macros to properly |
|
4326 | * IPython/Magic.py (Macro.__init__): improved macros to properly | |
4321 | handle magic commands in them. |
|
4327 | handle magic commands in them. | |
4322 | (Magic.magic_logstart): usernames are now expanded so 'logstart |
|
4328 | (Magic.magic_logstart): usernames are now expanded so 'logstart | |
4323 | ~/mylog' now works. |
|
4329 | ~/mylog' now works. | |
4324 |
|
4330 | |||
4325 | * IPython/iplib.py (complete): fixed bug where paths starting with |
|
4331 | * IPython/iplib.py (complete): fixed bug where paths starting with | |
4326 | '/' would be completed as magic names. |
|
4332 | '/' would be completed as magic names. | |
4327 |
|
4333 | |||
4328 | 2002-05-04 Fernando Perez <fperez@colorado.edu> |
|
4334 | 2002-05-04 Fernando Perez <fperez@colorado.edu> | |
4329 |
|
4335 | |||
4330 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to |
|
4336 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to | |
4331 | allow running full programs under the profiler's control. |
|
4337 | allow running full programs under the profiler's control. | |
4332 |
|
4338 | |||
4333 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars |
|
4339 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars | |
4334 | mode to report exceptions verbosely but without formatting |
|
4340 | mode to report exceptions verbosely but without formatting | |
4335 | variables. This addresses the issue of ipython 'freezing' (it's |
|
4341 | variables. This addresses the issue of ipython 'freezing' (it's | |
4336 | not frozen, but caught in an expensive formatting loop) when huge |
|
4342 | not frozen, but caught in an expensive formatting loop) when huge | |
4337 | variables are in the context of an exception. |
|
4343 | variables are in the context of an exception. | |
4338 | (VerboseTB.text): Added '--->' markers at line where exception was |
|
4344 | (VerboseTB.text): Added '--->' markers at line where exception was | |
4339 | triggered. Much clearer to read, especially in NoColor modes. |
|
4345 | triggered. Much clearer to read, especially in NoColor modes. | |
4340 |
|
4346 | |||
4341 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been |
|
4347 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been | |
4342 | implemented in reverse when changing to the new parse_options(). |
|
4348 | implemented in reverse when changing to the new parse_options(). | |
4343 |
|
4349 | |||
4344 | 2002-05-03 Fernando Perez <fperez@colorado.edu> |
|
4350 | 2002-05-03 Fernando Perez <fperez@colorado.edu> | |
4345 |
|
4351 | |||
4346 | * IPython/Magic.py (Magic.parse_options): new function so that |
|
4352 | * IPython/Magic.py (Magic.parse_options): new function so that | |
4347 | magics can parse options easier. |
|
4353 | magics can parse options easier. | |
4348 | (Magic.magic_prun): new function similar to profile.run(), |
|
4354 | (Magic.magic_prun): new function similar to profile.run(), | |
4349 | suggested by Chris Hart. |
|
4355 | suggested by Chris Hart. | |
4350 | (Magic.magic_cd): fixed behavior so that it only changes if |
|
4356 | (Magic.magic_cd): fixed behavior so that it only changes if | |
4351 | directory actually is in history. |
|
4357 | directory actually is in history. | |
4352 |
|
4358 | |||
4353 | * IPython/usage.py (__doc__): added information about potential |
|
4359 | * IPython/usage.py (__doc__): added information about potential | |
4354 | slowness of Verbose exception mode when there are huge data |
|
4360 | slowness of Verbose exception mode when there are huge data | |
4355 | structures to be formatted (thanks to Archie Paulson). |
|
4361 | structures to be formatted (thanks to Archie Paulson). | |
4356 |
|
4362 | |||
4357 | * IPython/ipmaker.py (make_IPython): Changed default logging |
|
4363 | * IPython/ipmaker.py (make_IPython): Changed default logging | |
4358 | (when simply called with -log) to use curr_dir/ipython.log in |
|
4364 | (when simply called with -log) to use curr_dir/ipython.log in | |
4359 | rotate mode. Fixed crash which was occuring with -log before |
|
4365 | rotate mode. Fixed crash which was occuring with -log before | |
4360 | (thanks to Jim Boyle). |
|
4366 | (thanks to Jim Boyle). | |
4361 |
|
4367 | |||
4362 | 2002-05-01 Fernando Perez <fperez@colorado.edu> |
|
4368 | 2002-05-01 Fernando Perez <fperez@colorado.edu> | |
4363 |
|
4369 | |||
4364 | * Released 0.2.11 for these fixes (mainly the ultraTB one which |
|
4370 | * Released 0.2.11 for these fixes (mainly the ultraTB one which | |
4365 | was nasty -- though somewhat of a corner case). |
|
4371 | was nasty -- though somewhat of a corner case). | |
4366 |
|
4372 | |||
4367 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to |
|
4373 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to | |
4368 | text (was a bug). |
|
4374 | text (was a bug). | |
4369 |
|
4375 | |||
4370 | 2002-04-30 Fernando Perez <fperez@colorado.edu> |
|
4376 | 2002-04-30 Fernando Perez <fperez@colorado.edu> | |
4371 |
|
4377 | |||
4372 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add |
|
4378 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add | |
4373 | a print after ^D or ^C from the user so that the In[] prompt |
|
4379 | a print after ^D or ^C from the user so that the In[] prompt | |
4374 | doesn't over-run the gnuplot one. |
|
4380 | doesn't over-run the gnuplot one. | |
4375 |
|
4381 | |||
4376 | 2002-04-29 Fernando Perez <fperez@colorado.edu> |
|
4382 | 2002-04-29 Fernando Perez <fperez@colorado.edu> | |
4377 |
|
4383 | |||
4378 | * Released 0.2.10 |
|
4384 | * Released 0.2.10 | |
4379 |
|
4385 | |||
4380 | * IPython/__release__.py (version): get date dynamically. |
|
4386 | * IPython/__release__.py (version): get date dynamically. | |
4381 |
|
4387 | |||
4382 | * Misc. documentation updates thanks to Arnd's comments. Also ran |
|
4388 | * Misc. documentation updates thanks to Arnd's comments. Also ran | |
4383 | a full spellcheck on the manual (hadn't been done in a while). |
|
4389 | a full spellcheck on the manual (hadn't been done in a while). | |
4384 |
|
4390 | |||
4385 | 2002-04-27 Fernando Perez <fperez@colorado.edu> |
|
4391 | 2002-04-27 Fernando Perez <fperez@colorado.edu> | |
4386 |
|
4392 | |||
4387 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where |
|
4393 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where | |
4388 | starting a log in mid-session would reset the input history list. |
|
4394 | starting a log in mid-session would reset the input history list. | |
4389 |
|
4395 | |||
4390 | 2002-04-26 Fernando Perez <fperez@colorado.edu> |
|
4396 | 2002-04-26 Fernando Perez <fperez@colorado.edu> | |
4391 |
|
4397 | |||
4392 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not |
|
4398 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not | |
4393 | all files were being included in an update. Now anything in |
|
4399 | all files were being included in an update. Now anything in | |
4394 | UserConfig that matches [A-Za-z]*.py will go (this excludes |
|
4400 | UserConfig that matches [A-Za-z]*.py will go (this excludes | |
4395 | __init__.py) |
|
4401 | __init__.py) | |
4396 |
|
4402 | |||
4397 | 2002-04-25 Fernando Perez <fperez@colorado.edu> |
|
4403 | 2002-04-25 Fernando Perez <fperez@colorado.edu> | |
4398 |
|
4404 | |||
4399 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ |
|
4405 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ | |
4400 | to __builtins__ so that any form of embedded or imported code can |
|
4406 | to __builtins__ so that any form of embedded or imported code can | |
4401 | test for being inside IPython. |
|
4407 | test for being inside IPython. | |
4402 |
|
4408 | |||
4403 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): |
|
4409 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): | |
4404 | changed to GnuplotMagic because it's now an importable module, |
|
4410 | changed to GnuplotMagic because it's now an importable module, | |
4405 | this makes the name follow that of the standard Gnuplot module. |
|
4411 | this makes the name follow that of the standard Gnuplot module. | |
4406 | GnuplotMagic can now be loaded at any time in mid-session. |
|
4412 | GnuplotMagic can now be loaded at any time in mid-session. | |
4407 |
|
4413 | |||
4408 | 2002-04-24 Fernando Perez <fperez@colorado.edu> |
|
4414 | 2002-04-24 Fernando Perez <fperez@colorado.edu> | |
4409 |
|
4415 | |||
4410 | * IPython/numutils.py: removed SIUnits. It doesn't properly set |
|
4416 | * IPython/numutils.py: removed SIUnits. It doesn't properly set | |
4411 | the globals (IPython has its own namespace) and the |
|
4417 | the globals (IPython has its own namespace) and the | |
4412 | PhysicalQuantity stuff is much better anyway. |
|
4418 | PhysicalQuantity stuff is much better anyway. | |
4413 |
|
4419 | |||
4414 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot |
|
4420 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot | |
4415 | embedding example to standard user directory for |
|
4421 | embedding example to standard user directory for | |
4416 | distribution. Also put it in the manual. |
|
4422 | distribution. Also put it in the manual. | |
4417 |
|
4423 | |||
4418 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot |
|
4424 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot | |
4419 | instance as first argument (so it doesn't rely on some obscure |
|
4425 | instance as first argument (so it doesn't rely on some obscure | |
4420 | hidden global). |
|
4426 | hidden global). | |
4421 |
|
4427 | |||
4422 | * IPython/UserConfig/ipythonrc.py: put () back in accepted |
|
4428 | * IPython/UserConfig/ipythonrc.py: put () back in accepted | |
4423 | delimiters. While it prevents ().TAB from working, it allows |
|
4429 | delimiters. While it prevents ().TAB from working, it allows | |
4424 | completions in open (... expressions. This is by far a more common |
|
4430 | completions in open (... expressions. This is by far a more common | |
4425 | case. |
|
4431 | case. | |
4426 |
|
4432 | |||
4427 | 2002-04-23 Fernando Perez <fperez@colorado.edu> |
|
4433 | 2002-04-23 Fernando Perez <fperez@colorado.edu> | |
4428 |
|
4434 | |||
4429 | * IPython/Extensions/InterpreterPasteInput.py: new |
|
4435 | * IPython/Extensions/InterpreterPasteInput.py: new | |
4430 | syntax-processing module for pasting lines with >>> or ... at the |
|
4436 | syntax-processing module for pasting lines with >>> or ... at the | |
4431 | start. |
|
4437 | start. | |
4432 |
|
4438 | |||
4433 | * IPython/Extensions/PhysicalQ_Interactive.py |
|
4439 | * IPython/Extensions/PhysicalQ_Interactive.py | |
4434 | (PhysicalQuantityInteractive.__int__): fixed to work with either |
|
4440 | (PhysicalQuantityInteractive.__int__): fixed to work with either | |
4435 | Numeric or math. |
|
4441 | Numeric or math. | |
4436 |
|
4442 | |||
4437 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the |
|
4443 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the | |
4438 | provided profiles. Now we have: |
|
4444 | provided profiles. Now we have: | |
4439 | -math -> math module as * and cmath with its own namespace. |
|
4445 | -math -> math module as * and cmath with its own namespace. | |
4440 | -numeric -> Numeric as *, plus gnuplot & grace |
|
4446 | -numeric -> Numeric as *, plus gnuplot & grace | |
4441 | -physics -> same as before |
|
4447 | -physics -> same as before | |
4442 |
|
4448 | |||
4443 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where |
|
4449 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where | |
4444 | user-defined magics wouldn't be found by @magic if they were |
|
4450 | user-defined magics wouldn't be found by @magic if they were | |
4445 | defined as class methods. Also cleaned up the namespace search |
|
4451 | defined as class methods. Also cleaned up the namespace search | |
4446 | logic and the string building (to use %s instead of many repeated |
|
4452 | logic and the string building (to use %s instead of many repeated | |
4447 | string adds). |
|
4453 | string adds). | |
4448 |
|
4454 | |||
4449 | * IPython/UserConfig/example-magic.py (magic_foo): updated example |
|
4455 | * IPython/UserConfig/example-magic.py (magic_foo): updated example | |
4450 | of user-defined magics to operate with class methods (cleaner, in |
|
4456 | of user-defined magics to operate with class methods (cleaner, in | |
4451 | line with the gnuplot code). |
|
4457 | line with the gnuplot code). | |
4452 |
|
4458 | |||
4453 | 2002-04-22 Fernando Perez <fperez@colorado.edu> |
|
4459 | 2002-04-22 Fernando Perez <fperez@colorado.edu> | |
4454 |
|
4460 | |||
4455 | * setup.py: updated dependency list so that manual is updated when |
|
4461 | * setup.py: updated dependency list so that manual is updated when | |
4456 | all included files change. |
|
4462 | all included files change. | |
4457 |
|
4463 | |||
4458 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring |
|
4464 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring | |
4459 | the delimiter removal option (the fix is ugly right now). |
|
4465 | the delimiter removal option (the fix is ugly right now). | |
4460 |
|
4466 | |||
4461 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load |
|
4467 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load | |
4462 | all of the math profile (quicker loading, no conflict between |
|
4468 | all of the math profile (quicker loading, no conflict between | |
4463 | g-9.8 and g-gnuplot). |
|
4469 | g-9.8 and g-gnuplot). | |
4464 |
|
4470 | |||
4465 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default |
|
4471 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default | |
4466 | name of post-mortem files to IPython_crash_report.txt. |
|
4472 | name of post-mortem files to IPython_crash_report.txt. | |
4467 |
|
4473 | |||
4468 | * Cleanup/update of the docs. Added all the new readline info and |
|
4474 | * Cleanup/update of the docs. Added all the new readline info and | |
4469 | formatted all lists as 'real lists'. |
|
4475 | formatted all lists as 'real lists'. | |
4470 |
|
4476 | |||
4471 | * IPython/ipmaker.py (make_IPython): removed now-obsolete |
|
4477 | * IPython/ipmaker.py (make_IPython): removed now-obsolete | |
4472 | tab-completion options, since the full readline parse_and_bind is |
|
4478 | tab-completion options, since the full readline parse_and_bind is | |
4473 | now accessible. |
|
4479 | now accessible. | |
4474 |
|
4480 | |||
4475 | * IPython/iplib.py (InteractiveShell.init_readline): Changed |
|
4481 | * IPython/iplib.py (InteractiveShell.init_readline): Changed | |
4476 | handling of readline options. Now users can specify any string to |
|
4482 | handling of readline options. Now users can specify any string to | |
4477 | be passed to parse_and_bind(), as well as the delimiters to be |
|
4483 | be passed to parse_and_bind(), as well as the delimiters to be | |
4478 | removed. |
|
4484 | removed. | |
4479 | (InteractiveShell.__init__): Added __name__ to the global |
|
4485 | (InteractiveShell.__init__): Added __name__ to the global | |
4480 | namespace so that things like Itpl which rely on its existence |
|
4486 | namespace so that things like Itpl which rely on its existence | |
4481 | don't crash. |
|
4487 | don't crash. | |
4482 | (InteractiveShell._prefilter): Defined the default with a _ so |
|
4488 | (InteractiveShell._prefilter): Defined the default with a _ so | |
4483 | that prefilter() is easier to override, while the default one |
|
4489 | that prefilter() is easier to override, while the default one | |
4484 | remains available. |
|
4490 | remains available. | |
4485 |
|
4491 | |||
4486 | 2002-04-18 Fernando Perez <fperez@colorado.edu> |
|
4492 | 2002-04-18 Fernando Perez <fperez@colorado.edu> | |
4487 |
|
4493 | |||
4488 | * Added information about pdb in the docs. |
|
4494 | * Added information about pdb in the docs. | |
4489 |
|
4495 | |||
4490 | 2002-04-17 Fernando Perez <fperez@colorado.edu> |
|
4496 | 2002-04-17 Fernando Perez <fperez@colorado.edu> | |
4491 |
|
4497 | |||
4492 | * IPython/ipmaker.py (make_IPython): added rc_override option to |
|
4498 | * IPython/ipmaker.py (make_IPython): added rc_override option to | |
4493 | allow passing config options at creation time which may override |
|
4499 | allow passing config options at creation time which may override | |
4494 | anything set in the config files or command line. This is |
|
4500 | anything set in the config files or command line. This is | |
4495 | particularly useful for configuring embedded instances. |
|
4501 | particularly useful for configuring embedded instances. | |
4496 |
|
4502 | |||
4497 | 2002-04-15 Fernando Perez <fperez@colorado.edu> |
|
4503 | 2002-04-15 Fernando Perez <fperez@colorado.edu> | |
4498 |
|
4504 | |||
4499 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could |
|
4505 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could | |
4500 | crash embedded instances because of the input cache falling out of |
|
4506 | crash embedded instances because of the input cache falling out of | |
4501 | sync with the output counter. |
|
4507 | sync with the output counter. | |
4502 |
|
4508 | |||
4503 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug |
|
4509 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug | |
4504 | mode which calls pdb after an uncaught exception in IPython itself. |
|
4510 | mode which calls pdb after an uncaught exception in IPython itself. | |
4505 |
|
4511 | |||
4506 | 2002-04-14 Fernando Perez <fperez@colorado.edu> |
|
4512 | 2002-04-14 Fernando Perez <fperez@colorado.edu> | |
4507 |
|
4513 | |||
4508 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up |
|
4514 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up | |
4509 | readline, fix it back after each call. |
|
4515 | readline, fix it back after each call. | |
4510 |
|
4516 | |||
4511 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private |
|
4517 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private | |
4512 | method to force all access via __call__(), which guarantees that |
|
4518 | method to force all access via __call__(), which guarantees that | |
4513 | traceback references are properly deleted. |
|
4519 | traceback references are properly deleted. | |
4514 |
|
4520 | |||
4515 | * IPython/Prompts.py (CachedOutput._display): minor fixes to |
|
4521 | * IPython/Prompts.py (CachedOutput._display): minor fixes to | |
4516 | improve printing when pprint is in use. |
|
4522 | improve printing when pprint is in use. | |
4517 |
|
4523 | |||
4518 | 2002-04-13 Fernando Perez <fperez@colorado.edu> |
|
4524 | 2002-04-13 Fernando Perez <fperez@colorado.edu> | |
4519 |
|
4525 | |||
4520 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit |
|
4526 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit | |
4521 | exceptions aren't caught anymore. If the user triggers one, he |
|
4527 | exceptions aren't caught anymore. If the user triggers one, he | |
4522 | should know why he's doing it and it should go all the way up, |
|
4528 | should know why he's doing it and it should go all the way up, | |
4523 | just like any other exception. So now @abort will fully kill the |
|
4529 | just like any other exception. So now @abort will fully kill the | |
4524 | embedded interpreter and the embedding code (unless that happens |
|
4530 | embedded interpreter and the embedding code (unless that happens | |
4525 | to catch SystemExit). |
|
4531 | to catch SystemExit). | |
4526 |
|
4532 | |||
4527 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag |
|
4533 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag | |
4528 | and a debugger() method to invoke the interactive pdb debugger |
|
4534 | and a debugger() method to invoke the interactive pdb debugger | |
4529 | after printing exception information. Also added the corresponding |
|
4535 | after printing exception information. Also added the corresponding | |
4530 | -pdb option and @pdb magic to control this feature, and updated |
|
4536 | -pdb option and @pdb magic to control this feature, and updated | |
4531 | the docs. After a suggestion from Christopher Hart |
|
4537 | the docs. After a suggestion from Christopher Hart | |
4532 | (hart-AT-caltech.edu). |
|
4538 | (hart-AT-caltech.edu). | |
4533 |
|
4539 | |||
4534 | 2002-04-12 Fernando Perez <fperez@colorado.edu> |
|
4540 | 2002-04-12 Fernando Perez <fperez@colorado.edu> | |
4535 |
|
4541 | |||
4536 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use |
|
4542 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use | |
4537 | the exception handlers defined by the user (not the CrashHandler) |
|
4543 | the exception handlers defined by the user (not the CrashHandler) | |
4538 | so that user exceptions don't trigger an ipython bug report. |
|
4544 | so that user exceptions don't trigger an ipython bug report. | |
4539 |
|
4545 | |||
4540 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme |
|
4546 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme | |
4541 | configurable (it should have always been so). |
|
4547 | configurable (it should have always been so). | |
4542 |
|
4548 | |||
4543 | 2002-03-26 Fernando Perez <fperez@colorado.edu> |
|
4549 | 2002-03-26 Fernando Perez <fperez@colorado.edu> | |
4544 |
|
4550 | |||
4545 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here |
|
4551 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here | |
4546 | and there to fix embedding namespace issues. This should all be |
|
4552 | and there to fix embedding namespace issues. This should all be | |
4547 | done in a more elegant way. |
|
4553 | done in a more elegant way. | |
4548 |
|
4554 | |||
4549 | 2002-03-25 Fernando Perez <fperez@colorado.edu> |
|
4555 | 2002-03-25 Fernando Perez <fperez@colorado.edu> | |
4550 |
|
4556 | |||
4551 | * IPython/genutils.py (get_home_dir): Try to make it work under |
|
4557 | * IPython/genutils.py (get_home_dir): Try to make it work under | |
4552 | win9x also. |
|
4558 | win9x also. | |
4553 |
|
4559 | |||
4554 | 2002-03-20 Fernando Perez <fperez@colorado.edu> |
|
4560 | 2002-03-20 Fernando Perez <fperez@colorado.edu> | |
4555 |
|
4561 | |||
4556 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave |
|
4562 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave | |
4557 | sys.displayhook untouched upon __init__. |
|
4563 | sys.displayhook untouched upon __init__. | |
4558 |
|
4564 | |||
4559 | 2002-03-19 Fernando Perez <fperez@colorado.edu> |
|
4565 | 2002-03-19 Fernando Perez <fperez@colorado.edu> | |
4560 |
|
4566 | |||
4561 | * Released 0.2.9 (for embedding bug, basically). |
|
4567 | * Released 0.2.9 (for embedding bug, basically). | |
4562 |
|
4568 | |||
4563 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit |
|
4569 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit | |
4564 | exceptions so that enclosing shell's state can be restored. |
|
4570 | exceptions so that enclosing shell's state can be restored. | |
4565 |
|
4571 | |||
4566 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize |
|
4572 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize | |
4567 | naming conventions in the .ipython/ dir. |
|
4573 | naming conventions in the .ipython/ dir. | |
4568 |
|
4574 | |||
4569 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' |
|
4575 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' | |
4570 | from delimiters list so filenames with - in them get expanded. |
|
4576 | from delimiters list so filenames with - in them get expanded. | |
4571 |
|
4577 | |||
4572 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with |
|
4578 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with | |
4573 | sys.displayhook not being properly restored after an embedded call. |
|
4579 | sys.displayhook not being properly restored after an embedded call. | |
4574 |
|
4580 | |||
4575 | 2002-03-18 Fernando Perez <fperez@colorado.edu> |
|
4581 | 2002-03-18 Fernando Perez <fperez@colorado.edu> | |
4576 |
|
4582 | |||
4577 | * Released 0.2.8 |
|
4583 | * Released 0.2.8 | |
4578 |
|
4584 | |||
4579 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where |
|
4585 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where | |
4580 | some files weren't being included in a -upgrade. |
|
4586 | some files weren't being included in a -upgrade. | |
4581 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous |
|
4587 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous | |
4582 | on' so that the first tab completes. |
|
4588 | on' so that the first tab completes. | |
4583 | (InteractiveShell.handle_magic): fixed bug with spaces around |
|
4589 | (InteractiveShell.handle_magic): fixed bug with spaces around | |
4584 | quotes breaking many magic commands. |
|
4590 | quotes breaking many magic commands. | |
4585 |
|
4591 | |||
4586 | * setup.py: added note about ignoring the syntax error messages at |
|
4592 | * setup.py: added note about ignoring the syntax error messages at | |
4587 | installation. |
|
4593 | installation. | |
4588 |
|
4594 | |||
4589 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished |
|
4595 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished | |
4590 | streamlining the gnuplot interface, now there's only one magic @gp. |
|
4596 | streamlining the gnuplot interface, now there's only one magic @gp. | |
4591 |
|
4597 | |||
4592 | 2002-03-17 Fernando Perez <fperez@colorado.edu> |
|
4598 | 2002-03-17 Fernando Perez <fperez@colorado.edu> | |
4593 |
|
4599 | |||
4594 | * IPython/UserConfig/magic_gnuplot.py: new name for the |
|
4600 | * IPython/UserConfig/magic_gnuplot.py: new name for the | |
4595 | example-magic_pm.py file. Much enhanced system, now with a shell |
|
4601 | example-magic_pm.py file. Much enhanced system, now with a shell | |
4596 | for communicating directly with gnuplot, one command at a time. |
|
4602 | for communicating directly with gnuplot, one command at a time. | |
4597 |
|
4603 | |||
4598 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent |
|
4604 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent | |
4599 | setting __name__=='__main__'. |
|
4605 | setting __name__=='__main__'. | |
4600 |
|
4606 | |||
4601 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added |
|
4607 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added | |
4602 | mini-shell for accessing gnuplot from inside ipython. Should |
|
4608 | mini-shell for accessing gnuplot from inside ipython. Should | |
4603 | extend it later for grace access too. Inspired by Arnd's |
|
4609 | extend it later for grace access too. Inspired by Arnd's | |
4604 | suggestion. |
|
4610 | suggestion. | |
4605 |
|
4611 | |||
4606 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when |
|
4612 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when | |
4607 | calling magic functions with () in their arguments. Thanks to Arnd |
|
4613 | calling magic functions with () in their arguments. Thanks to Arnd | |
4608 | Baecker for pointing this to me. |
|
4614 | Baecker for pointing this to me. | |
4609 |
|
4615 | |||
4610 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse |
|
4616 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse | |
4611 | infinitely for integer or complex arrays (only worked with floats). |
|
4617 | infinitely for integer or complex arrays (only worked with floats). | |
4612 |
|
4618 | |||
4613 | 2002-03-16 Fernando Perez <fperez@colorado.edu> |
|
4619 | 2002-03-16 Fernando Perez <fperez@colorado.edu> | |
4614 |
|
4620 | |||
4615 | * setup.py: Merged setup and setup_windows into a single script |
|
4621 | * setup.py: Merged setup and setup_windows into a single script | |
4616 | which properly handles things for windows users. |
|
4622 | which properly handles things for windows users. | |
4617 |
|
4623 | |||
4618 | 2002-03-15 Fernando Perez <fperez@colorado.edu> |
|
4624 | 2002-03-15 Fernando Perez <fperez@colorado.edu> | |
4619 |
|
4625 | |||
4620 | * Big change to the manual: now the magics are all automatically |
|
4626 | * Big change to the manual: now the magics are all automatically | |
4621 | documented. This information is generated from their docstrings |
|
4627 | documented. This information is generated from their docstrings | |
4622 | and put in a latex file included by the manual lyx file. This way |
|
4628 | and put in a latex file included by the manual lyx file. This way | |
4623 | we get always up to date information for the magics. The manual |
|
4629 | we get always up to date information for the magics. The manual | |
4624 | now also has proper version information, also auto-synced. |
|
4630 | now also has proper version information, also auto-synced. | |
4625 |
|
4631 | |||
4626 | For this to work, an undocumented --magic_docstrings option was added. |
|
4632 | For this to work, an undocumented --magic_docstrings option was added. | |
4627 |
|
4633 | |||
4628 | 2002-03-13 Fernando Perez <fperez@colorado.edu> |
|
4634 | 2002-03-13 Fernando Perez <fperez@colorado.edu> | |
4629 |
|
4635 | |||
4630 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors |
|
4636 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors | |
4631 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. |
|
4637 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. | |
4632 |
|
4638 | |||
4633 | 2002-03-12 Fernando Perez <fperez@colorado.edu> |
|
4639 | 2002-03-12 Fernando Perez <fperez@colorado.edu> | |
4634 |
|
4640 | |||
4635 | * IPython/ultraTB.py (TermColors): changed color escapes again to |
|
4641 | * IPython/ultraTB.py (TermColors): changed color escapes again to | |
4636 | fix the (old, reintroduced) line-wrapping bug. Basically, if |
|
4642 | fix the (old, reintroduced) line-wrapping bug. Basically, if | |
4637 | \001..\002 aren't given in the color escapes, lines get wrapped |
|
4643 | \001..\002 aren't given in the color escapes, lines get wrapped | |
4638 | weirdly. But giving those screws up old xterms and emacs terms. So |
|
4644 | weirdly. But giving those screws up old xterms and emacs terms. So | |
4639 | I added some logic for emacs terms to be ok, but I can't identify old |
|
4645 | I added some logic for emacs terms to be ok, but I can't identify old | |
4640 | xterms separately ($TERM=='xterm' for many terminals, like konsole). |
|
4646 | xterms separately ($TERM=='xterm' for many terminals, like konsole). | |
4641 |
|
4647 | |||
4642 | 2002-03-10 Fernando Perez <fperez@colorado.edu> |
|
4648 | 2002-03-10 Fernando Perez <fperez@colorado.edu> | |
4643 |
|
4649 | |||
4644 | * IPython/usage.py (__doc__): Various documentation cleanups and |
|
4650 | * IPython/usage.py (__doc__): Various documentation cleanups and | |
4645 | updates, both in usage docstrings and in the manual. |
|
4651 | updates, both in usage docstrings and in the manual. | |
4646 |
|
4652 | |||
4647 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for |
|
4653 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for | |
4648 | handling of caching. Set minimum acceptabe value for having a |
|
4654 | handling of caching. Set minimum acceptabe value for having a | |
4649 | cache at 20 values. |
|
4655 | cache at 20 values. | |
4650 |
|
4656 | |||
4651 | * IPython/iplib.py (InteractiveShell.user_setup): moved the |
|
4657 | * IPython/iplib.py (InteractiveShell.user_setup): moved the | |
4652 | install_first_time function to a method, renamed it and added an |
|
4658 | install_first_time function to a method, renamed it and added an | |
4653 | 'upgrade' mode. Now people can update their config directory with |
|
4659 | 'upgrade' mode. Now people can update their config directory with | |
4654 | a simple command line switch (-upgrade, also new). |
|
4660 | a simple command line switch (-upgrade, also new). | |
4655 |
|
4661 | |||
4656 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to |
|
4662 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to | |
4657 | @file (convenient for automagic users under Python >= 2.2). |
|
4663 | @file (convenient for automagic users under Python >= 2.2). | |
4658 | Removed @files (it seemed more like a plural than an abbrev. of |
|
4664 | Removed @files (it seemed more like a plural than an abbrev. of | |
4659 | 'file show'). |
|
4665 | 'file show'). | |
4660 |
|
4666 | |||
4661 | * IPython/iplib.py (install_first_time): Fixed crash if there were |
|
4667 | * IPython/iplib.py (install_first_time): Fixed crash if there were | |
4662 | backup files ('~') in .ipython/ install directory. |
|
4668 | backup files ('~') in .ipython/ install directory. | |
4663 |
|
4669 | |||
4664 | * IPython/ipmaker.py (make_IPython): fixes for new prompt |
|
4670 | * IPython/ipmaker.py (make_IPython): fixes for new prompt | |
4665 | system. Things look fine, but these changes are fairly |
|
4671 | system. Things look fine, but these changes are fairly | |
4666 | intrusive. Test them for a few days. |
|
4672 | intrusive. Test them for a few days. | |
4667 |
|
4673 | |||
4668 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of |
|
4674 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of | |
4669 | the prompts system. Now all in/out prompt strings are user |
|
4675 | the prompts system. Now all in/out prompt strings are user | |
4670 | controllable. This is particularly useful for embedding, as one |
|
4676 | controllable. This is particularly useful for embedding, as one | |
4671 | can tag embedded instances with particular prompts. |
|
4677 | can tag embedded instances with particular prompts. | |
4672 |
|
4678 | |||
4673 | Also removed global use of sys.ps1/2, which now allows nested |
|
4679 | Also removed global use of sys.ps1/2, which now allows nested | |
4674 | embeddings without any problems. Added command-line options for |
|
4680 | embeddings without any problems. Added command-line options for | |
4675 | the prompt strings. |
|
4681 | the prompt strings. | |
4676 |
|
4682 | |||
4677 | 2002-03-08 Fernando Perez <fperez@colorado.edu> |
|
4683 | 2002-03-08 Fernando Perez <fperez@colorado.edu> | |
4678 |
|
4684 | |||
4679 | * IPython/UserConfig/example-embed-short.py (ipshell): added |
|
4685 | * IPython/UserConfig/example-embed-short.py (ipshell): added | |
4680 | example file with the bare minimum code for embedding. |
|
4686 | example file with the bare minimum code for embedding. | |
4681 |
|
4687 | |||
4682 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added |
|
4688 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added | |
4683 | functionality for the embeddable shell to be activated/deactivated |
|
4689 | functionality for the embeddable shell to be activated/deactivated | |
4684 | either globally or at each call. |
|
4690 | either globally or at each call. | |
4685 |
|
4691 | |||
4686 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of |
|
4692 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of | |
4687 | rewriting the prompt with '--->' for auto-inputs with proper |
|
4693 | rewriting the prompt with '--->' for auto-inputs with proper | |
4688 | coloring. Now the previous UGLY hack in handle_auto() is gone, and |
|
4694 | coloring. Now the previous UGLY hack in handle_auto() is gone, and | |
4689 | this is handled by the prompts class itself, as it should. |
|
4695 | this is handled by the prompts class itself, as it should. | |
4690 |
|
4696 | |||
4691 | 2002-03-05 Fernando Perez <fperez@colorado.edu> |
|
4697 | 2002-03-05 Fernando Perez <fperez@colorado.edu> | |
4692 |
|
4698 | |||
4693 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to |
|
4699 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to | |
4694 | @logstart to avoid name clashes with the math log function. |
|
4700 | @logstart to avoid name clashes with the math log function. | |
4695 |
|
4701 | |||
4696 | * Big updates to X/Emacs section of the manual. |
|
4702 | * Big updates to X/Emacs section of the manual. | |
4697 |
|
4703 | |||
4698 | * Removed ipython_emacs. Milan explained to me how to pass |
|
4704 | * Removed ipython_emacs. Milan explained to me how to pass | |
4699 | arguments to ipython through Emacs. Some day I'm going to end up |
|
4705 | arguments to ipython through Emacs. Some day I'm going to end up | |
4700 | learning some lisp... |
|
4706 | learning some lisp... | |
4701 |
|
4707 | |||
4702 | 2002-03-04 Fernando Perez <fperez@colorado.edu> |
|
4708 | 2002-03-04 Fernando Perez <fperez@colorado.edu> | |
4703 |
|
4709 | |||
4704 | * IPython/ipython_emacs: Created script to be used as the |
|
4710 | * IPython/ipython_emacs: Created script to be used as the | |
4705 | py-python-command Emacs variable so we can pass IPython |
|
4711 | py-python-command Emacs variable so we can pass IPython | |
4706 | parameters. I can't figure out how to tell Emacs directly to pass |
|
4712 | parameters. I can't figure out how to tell Emacs directly to pass | |
4707 | parameters to IPython, so a dummy shell script will do it. |
|
4713 | parameters to IPython, so a dummy shell script will do it. | |
4708 |
|
4714 | |||
4709 | Other enhancements made for things to work better under Emacs' |
|
4715 | Other enhancements made for things to work better under Emacs' | |
4710 | various types of terminals. Many thanks to Milan Zamazal |
|
4716 | various types of terminals. Many thanks to Milan Zamazal | |
4711 | <pdm-AT-zamazal.org> for all the suggestions and pointers. |
|
4717 | <pdm-AT-zamazal.org> for all the suggestions and pointers. | |
4712 |
|
4718 | |||
4713 | 2002-03-01 Fernando Perez <fperez@colorado.edu> |
|
4719 | 2002-03-01 Fernando Perez <fperez@colorado.edu> | |
4714 |
|
4720 | |||
4715 | * IPython/ipmaker.py (make_IPython): added a --readline! option so |
|
4721 | * IPython/ipmaker.py (make_IPython): added a --readline! option so | |
4716 | that loading of readline is now optional. This gives better |
|
4722 | that loading of readline is now optional. This gives better | |
4717 | control to emacs users. |
|
4723 | control to emacs users. | |
4718 |
|
4724 | |||
4719 | * IPython/ultraTB.py (__date__): Modified color escape sequences |
|
4725 | * IPython/ultraTB.py (__date__): Modified color escape sequences | |
4720 | and now things work fine under xterm and in Emacs' term buffers |
|
4726 | and now things work fine under xterm and in Emacs' term buffers | |
4721 | (though not shell ones). Well, in emacs you get colors, but all |
|
4727 | (though not shell ones). Well, in emacs you get colors, but all | |
4722 | seem to be 'light' colors (no difference between dark and light |
|
4728 | seem to be 'light' colors (no difference between dark and light | |
4723 | ones). But the garbage chars are gone, and also in xterms. It |
|
4729 | ones). But the garbage chars are gone, and also in xterms. It | |
4724 | seems that now I'm using 'cleaner' ansi sequences. |
|
4730 | seems that now I'm using 'cleaner' ansi sequences. | |
4725 |
|
4731 | |||
4726 | 2002-02-21 Fernando Perez <fperez@colorado.edu> |
|
4732 | 2002-02-21 Fernando Perez <fperez@colorado.edu> | |
4727 |
|
4733 | |||
4728 | * Released 0.2.7 (mainly to publish the scoping fix). |
|
4734 | * Released 0.2.7 (mainly to publish the scoping fix). | |
4729 |
|
4735 | |||
4730 | * IPython/Logger.py (Logger.logstate): added. A corresponding |
|
4736 | * IPython/Logger.py (Logger.logstate): added. A corresponding | |
4731 | @logstate magic was created. |
|
4737 | @logstate magic was created. | |
4732 |
|
4738 | |||
4733 | * IPython/Magic.py: fixed nested scoping problem under Python |
|
4739 | * IPython/Magic.py: fixed nested scoping problem under Python | |
4734 | 2.1.x (automagic wasn't working). |
|
4740 | 2.1.x (automagic wasn't working). | |
4735 |
|
4741 | |||
4736 | 2002-02-20 Fernando Perez <fperez@colorado.edu> |
|
4742 | 2002-02-20 Fernando Perez <fperez@colorado.edu> | |
4737 |
|
4743 | |||
4738 | * Released 0.2.6. |
|
4744 | * Released 0.2.6. | |
4739 |
|
4745 | |||
4740 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' |
|
4746 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' | |
4741 | option so that logs can come out without any headers at all. |
|
4747 | option so that logs can come out without any headers at all. | |
4742 |
|
4748 | |||
4743 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for |
|
4749 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for | |
4744 | SciPy. |
|
4750 | SciPy. | |
4745 |
|
4751 | |||
4746 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so |
|
4752 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so | |
4747 | that embedded IPython calls don't require vars() to be explicitly |
|
4753 | that embedded IPython calls don't require vars() to be explicitly | |
4748 | passed. Now they are extracted from the caller's frame (code |
|
4754 | passed. Now they are extracted from the caller's frame (code | |
4749 | snatched from Eric Jones' weave). Added better documentation to |
|
4755 | snatched from Eric Jones' weave). Added better documentation to | |
4750 | the section on embedding and the example file. |
|
4756 | the section on embedding and the example file. | |
4751 |
|
4757 | |||
4752 | * IPython/genutils.py (page): Changed so that under emacs, it just |
|
4758 | * IPython/genutils.py (page): Changed so that under emacs, it just | |
4753 | prints the string. You can then page up and down in the emacs |
|
4759 | prints the string. You can then page up and down in the emacs | |
4754 | buffer itself. This is how the builtin help() works. |
|
4760 | buffer itself. This is how the builtin help() works. | |
4755 |
|
4761 | |||
4756 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with |
|
4762 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with | |
4757 | macro scoping: macros need to be executed in the user's namespace |
|
4763 | macro scoping: macros need to be executed in the user's namespace | |
4758 | to work as if they had been typed by the user. |
|
4764 | to work as if they had been typed by the user. | |
4759 |
|
4765 | |||
4760 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they |
|
4766 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they | |
4761 | execute automatically (no need to type 'exec...'). They then |
|
4767 | execute automatically (no need to type 'exec...'). They then | |
4762 | behave like 'true macros'. The printing system was also modified |
|
4768 | behave like 'true macros'. The printing system was also modified | |
4763 | for this to work. |
|
4769 | for this to work. | |
4764 |
|
4770 | |||
4765 | 2002-02-19 Fernando Perez <fperez@colorado.edu> |
|
4771 | 2002-02-19 Fernando Perez <fperez@colorado.edu> | |
4766 |
|
4772 | |||
4767 | * IPython/genutils.py (page_file): new function for paging files |
|
4773 | * IPython/genutils.py (page_file): new function for paging files | |
4768 | in an OS-independent way. Also necessary for file viewing to work |
|
4774 | in an OS-independent way. Also necessary for file viewing to work | |
4769 | well inside Emacs buffers. |
|
4775 | well inside Emacs buffers. | |
4770 | (page): Added checks for being in an emacs buffer. |
|
4776 | (page): Added checks for being in an emacs buffer. | |
4771 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed |
|
4777 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed | |
4772 | same bug in iplib. |
|
4778 | same bug in iplib. | |
4773 |
|
4779 | |||
4774 | 2002-02-18 Fernando Perez <fperez@colorado.edu> |
|
4780 | 2002-02-18 Fernando Perez <fperez@colorado.edu> | |
4775 |
|
4781 | |||
4776 | * IPython/iplib.py (InteractiveShell.init_readline): modified use |
|
4782 | * IPython/iplib.py (InteractiveShell.init_readline): modified use | |
4777 | of readline so that IPython can work inside an Emacs buffer. |
|
4783 | of readline so that IPython can work inside an Emacs buffer. | |
4778 |
|
4784 | |||
4779 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to |
|
4785 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to | |
4780 | method signatures (they weren't really bugs, but it looks cleaner |
|
4786 | method signatures (they weren't really bugs, but it looks cleaner | |
4781 | and keeps PyChecker happy). |
|
4787 | and keeps PyChecker happy). | |
4782 |
|
4788 | |||
4783 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP |
|
4789 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP | |
4784 | for implementing various user-defined hooks. Currently only |
|
4790 | for implementing various user-defined hooks. Currently only | |
4785 | display is done. |
|
4791 | display is done. | |
4786 |
|
4792 | |||
4787 | * IPython/Prompts.py (CachedOutput._display): changed display |
|
4793 | * IPython/Prompts.py (CachedOutput._display): changed display | |
4788 | functions so that they can be dynamically changed by users easily. |
|
4794 | functions so that they can be dynamically changed by users easily. | |
4789 |
|
4795 | |||
4790 | * IPython/Extensions/numeric_formats.py (num_display): added an |
|
4796 | * IPython/Extensions/numeric_formats.py (num_display): added an | |
4791 | extension for printing NumPy arrays in flexible manners. It |
|
4797 | extension for printing NumPy arrays in flexible manners. It | |
4792 | doesn't do anything yet, but all the structure is in |
|
4798 | doesn't do anything yet, but all the structure is in | |
4793 | place. Ultimately the plan is to implement output format control |
|
4799 | place. Ultimately the plan is to implement output format control | |
4794 | like in Octave. |
|
4800 | like in Octave. | |
4795 |
|
4801 | |||
4796 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic |
|
4802 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic | |
4797 | methods are found at run-time by all the automatic machinery. |
|
4803 | methods are found at run-time by all the automatic machinery. | |
4798 |
|
4804 | |||
4799 | 2002-02-17 Fernando Perez <fperez@colorado.edu> |
|
4805 | 2002-02-17 Fernando Perez <fperez@colorado.edu> | |
4800 |
|
4806 | |||
4801 | * setup_Windows.py (make_shortcut): documented. Cleaned up the |
|
4807 | * setup_Windows.py (make_shortcut): documented. Cleaned up the | |
4802 | whole file a little. |
|
4808 | whole file a little. | |
4803 |
|
4809 | |||
4804 | * ToDo: closed this document. Now there's a new_design.lyx |
|
4810 | * ToDo: closed this document. Now there's a new_design.lyx | |
4805 | document for all new ideas. Added making a pdf of it for the |
|
4811 | document for all new ideas. Added making a pdf of it for the | |
4806 | end-user distro. |
|
4812 | end-user distro. | |
4807 |
|
4813 | |||
4808 | * IPython/Logger.py (Logger.switch_log): Created this to replace |
|
4814 | * IPython/Logger.py (Logger.switch_log): Created this to replace | |
4809 | logon() and logoff(). It also fixes a nasty crash reported by |
|
4815 | logon() and logoff(). It also fixes a nasty crash reported by | |
4810 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. |
|
4816 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. | |
4811 |
|
4817 | |||
4812 | * IPython/iplib.py (complete): got auto-completion to work with |
|
4818 | * IPython/iplib.py (complete): got auto-completion to work with | |
4813 | automagic (I had wanted this for a long time). |
|
4819 | automagic (I had wanted this for a long time). | |
4814 |
|
4820 | |||
4815 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias |
|
4821 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias | |
4816 | to @file, since file() is now a builtin and clashes with automagic |
|
4822 | to @file, since file() is now a builtin and clashes with automagic | |
4817 | for @file. |
|
4823 | for @file. | |
4818 |
|
4824 | |||
4819 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All |
|
4825 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All | |
4820 | of this was previously in iplib, which had grown to more than 2000 |
|
4826 | of this was previously in iplib, which had grown to more than 2000 | |
4821 | lines, way too long. No new functionality, but it makes managing |
|
4827 | lines, way too long. No new functionality, but it makes managing | |
4822 | the code a bit easier. |
|
4828 | the code a bit easier. | |
4823 |
|
4829 | |||
4824 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version |
|
4830 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version | |
4825 | information to crash reports. |
|
4831 | information to crash reports. | |
4826 |
|
4832 | |||
4827 | 2002-02-12 Fernando Perez <fperez@colorado.edu> |
|
4833 | 2002-02-12 Fernando Perez <fperez@colorado.edu> | |
4828 |
|
4834 | |||
4829 | * Released 0.2.5. |
|
4835 | * Released 0.2.5. | |
4830 |
|
4836 | |||
4831 | 2002-02-11 Fernando Perez <fperez@colorado.edu> |
|
4837 | 2002-02-11 Fernando Perez <fperez@colorado.edu> | |
4832 |
|
4838 | |||
4833 | * Wrote a relatively complete Windows installer. It puts |
|
4839 | * Wrote a relatively complete Windows installer. It puts | |
4834 | everything in place, creates Start Menu entries and fixes the |
|
4840 | everything in place, creates Start Menu entries and fixes the | |
4835 | color issues. Nothing fancy, but it works. |
|
4841 | color issues. Nothing fancy, but it works. | |
4836 |
|
4842 | |||
4837 | 2002-02-10 Fernando Perez <fperez@colorado.edu> |
|
4843 | 2002-02-10 Fernando Perez <fperez@colorado.edu> | |
4838 |
|
4844 | |||
4839 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an |
|
4845 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an | |
4840 | os.path.expanduser() call so that we can type @run ~/myfile.py and |
|
4846 | os.path.expanduser() call so that we can type @run ~/myfile.py and | |
4841 | have thigs work as expected. |
|
4847 | have thigs work as expected. | |
4842 |
|
4848 | |||
4843 | * IPython/genutils.py (page): fixed exception handling so things |
|
4849 | * IPython/genutils.py (page): fixed exception handling so things | |
4844 | work both in Unix and Windows correctly. Quitting a pager triggers |
|
4850 | work both in Unix and Windows correctly. Quitting a pager triggers | |
4845 | an IOError/broken pipe in Unix, and in windows not finding a pager |
|
4851 | an IOError/broken pipe in Unix, and in windows not finding a pager | |
4846 | is also an IOError, so I had to actually look at the return value |
|
4852 | is also an IOError, so I had to actually look at the return value | |
4847 | of the exception, not just the exception itself. Should be ok now. |
|
4853 | of the exception, not just the exception itself. Should be ok now. | |
4848 |
|
4854 | |||
4849 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): |
|
4855 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): | |
4850 | modified to allow case-insensitive color scheme changes. |
|
4856 | modified to allow case-insensitive color scheme changes. | |
4851 |
|
4857 | |||
4852 | 2002-02-09 Fernando Perez <fperez@colorado.edu> |
|
4858 | 2002-02-09 Fernando Perez <fperez@colorado.edu> | |
4853 |
|
4859 | |||
4854 | * IPython/genutils.py (native_line_ends): new function to leave |
|
4860 | * IPython/genutils.py (native_line_ends): new function to leave | |
4855 | user config files with os-native line-endings. |
|
4861 | user config files with os-native line-endings. | |
4856 |
|
4862 | |||
4857 | * README and manual updates. |
|
4863 | * README and manual updates. | |
4858 |
|
4864 | |||
4859 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes |
|
4865 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes | |
4860 | instead of StringType to catch Unicode strings. |
|
4866 | instead of StringType to catch Unicode strings. | |
4861 |
|
4867 | |||
4862 | * IPython/genutils.py (filefind): fixed bug for paths with |
|
4868 | * IPython/genutils.py (filefind): fixed bug for paths with | |
4863 | embedded spaces (very common in Windows). |
|
4869 | embedded spaces (very common in Windows). | |
4864 |
|
4870 | |||
4865 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc |
|
4871 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc | |
4866 | files under Windows, so that they get automatically associated |
|
4872 | files under Windows, so that they get automatically associated | |
4867 | with a text editor. Windows makes it a pain to handle |
|
4873 | with a text editor. Windows makes it a pain to handle | |
4868 | extension-less files. |
|
4874 | extension-less files. | |
4869 |
|
4875 | |||
4870 | * IPython/iplib.py (InteractiveShell.init_readline): Made the |
|
4876 | * IPython/iplib.py (InteractiveShell.init_readline): Made the | |
4871 | warning about readline only occur for Posix. In Windows there's no |
|
4877 | warning about readline only occur for Posix. In Windows there's no | |
4872 | way to get readline, so why bother with the warning. |
|
4878 | way to get readline, so why bother with the warning. | |
4873 |
|
4879 | |||
4874 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ |
|
4880 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ | |
4875 | for __str__ instead of dir(self), since dir() changed in 2.2. |
|
4881 | for __str__ instead of dir(self), since dir() changed in 2.2. | |
4876 |
|
4882 | |||
4877 | * Ported to Windows! Tested on XP, I suspect it should work fine |
|
4883 | * Ported to Windows! Tested on XP, I suspect it should work fine | |
4878 | on NT/2000, but I don't think it will work on 98 et al. That |
|
4884 | on NT/2000, but I don't think it will work on 98 et al. That | |
4879 | series of Windows is such a piece of junk anyway that I won't try |
|
4885 | series of Windows is such a piece of junk anyway that I won't try | |
4880 | porting it there. The XP port was straightforward, showed a few |
|
4886 | porting it there. The XP port was straightforward, showed a few | |
4881 | bugs here and there (fixed all), in particular some string |
|
4887 | bugs here and there (fixed all), in particular some string | |
4882 | handling stuff which required considering Unicode strings (which |
|
4888 | handling stuff which required considering Unicode strings (which | |
4883 | Windows uses). This is good, but hasn't been too tested :) No |
|
4889 | Windows uses). This is good, but hasn't been too tested :) No | |
4884 | fancy installer yet, I'll put a note in the manual so people at |
|
4890 | fancy installer yet, I'll put a note in the manual so people at | |
4885 | least make manually a shortcut. |
|
4891 | least make manually a shortcut. | |
4886 |
|
4892 | |||
4887 | * IPython/iplib.py (Magic.magic_colors): Unified the color options |
|
4893 | * IPython/iplib.py (Magic.magic_colors): Unified the color options | |
4888 | into a single one, "colors". This now controls both prompt and |
|
4894 | into a single one, "colors". This now controls both prompt and | |
4889 | exception color schemes, and can be changed both at startup |
|
4895 | exception color schemes, and can be changed both at startup | |
4890 | (either via command-line switches or via ipythonrc files) and at |
|
4896 | (either via command-line switches or via ipythonrc files) and at | |
4891 | runtime, with @colors. |
|
4897 | runtime, with @colors. | |
4892 | (Magic.magic_run): renamed @prun to @run and removed the old |
|
4898 | (Magic.magic_run): renamed @prun to @run and removed the old | |
4893 | @run. The two were too similar to warrant keeping both. |
|
4899 | @run. The two were too similar to warrant keeping both. | |
4894 |
|
4900 | |||
4895 | 2002-02-03 Fernando Perez <fperez@colorado.edu> |
|
4901 | 2002-02-03 Fernando Perez <fperez@colorado.edu> | |
4896 |
|
4902 | |||
4897 | * IPython/iplib.py (install_first_time): Added comment on how to |
|
4903 | * IPython/iplib.py (install_first_time): Added comment on how to | |
4898 | configure the color options for first-time users. Put a <return> |
|
4904 | configure the color options for first-time users. Put a <return> | |
4899 | request at the end so that small-terminal users get a chance to |
|
4905 | request at the end so that small-terminal users get a chance to | |
4900 | read the startup info. |
|
4906 | read the startup info. | |
4901 |
|
4907 | |||
4902 | 2002-01-23 Fernando Perez <fperez@colorado.edu> |
|
4908 | 2002-01-23 Fernando Perez <fperez@colorado.edu> | |
4903 |
|
4909 | |||
4904 | * IPython/iplib.py (CachedOutput.update): Changed output memory |
|
4910 | * IPython/iplib.py (CachedOutput.update): Changed output memory | |
4905 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For |
|
4911 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For | |
4906 | input history we still use _i. Did this b/c these variable are |
|
4912 | input history we still use _i. Did this b/c these variable are | |
4907 | very commonly used in interactive work, so the less we need to |
|
4913 | very commonly used in interactive work, so the less we need to | |
4908 | type the better off we are. |
|
4914 | type the better off we are. | |
4909 | (Magic.magic_prun): updated @prun to better handle the namespaces |
|
4915 | (Magic.magic_prun): updated @prun to better handle the namespaces | |
4910 | the file will run in, including a fix for __name__ not being set |
|
4916 | the file will run in, including a fix for __name__ not being set | |
4911 | before. |
|
4917 | before. | |
4912 |
|
4918 | |||
4913 | 2002-01-20 Fernando Perez <fperez@colorado.edu> |
|
4919 | 2002-01-20 Fernando Perez <fperez@colorado.edu> | |
4914 |
|
4920 | |||
4915 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of |
|
4921 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of | |
4916 | extra garbage for Python 2.2. Need to look more carefully into |
|
4922 | extra garbage for Python 2.2. Need to look more carefully into | |
4917 | this later. |
|
4923 | this later. | |
4918 |
|
4924 | |||
4919 | 2002-01-19 Fernando Perez <fperez@colorado.edu> |
|
4925 | 2002-01-19 Fernando Perez <fperez@colorado.edu> | |
4920 |
|
4926 | |||
4921 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to |
|
4927 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to | |
4922 | display SyntaxError exceptions properly formatted when they occur |
|
4928 | display SyntaxError exceptions properly formatted when they occur | |
4923 | (they can be triggered by imported code). |
|
4929 | (they can be triggered by imported code). | |
4924 |
|
4930 | |||
4925 | 2002-01-18 Fernando Perez <fperez@colorado.edu> |
|
4931 | 2002-01-18 Fernando Perez <fperez@colorado.edu> | |
4926 |
|
4932 | |||
4927 | * IPython/iplib.py (InteractiveShell.safe_execfile): now |
|
4933 | * IPython/iplib.py (InteractiveShell.safe_execfile): now | |
4928 | SyntaxError exceptions are reported nicely formatted, instead of |
|
4934 | SyntaxError exceptions are reported nicely formatted, instead of | |
4929 | spitting out only offset information as before. |
|
4935 | spitting out only offset information as before. | |
4930 | (Magic.magic_prun): Added the @prun function for executing |
|
4936 | (Magic.magic_prun): Added the @prun function for executing | |
4931 | programs with command line args inside IPython. |
|
4937 | programs with command line args inside IPython. | |
4932 |
|
4938 | |||
4933 | 2002-01-16 Fernando Perez <fperez@colorado.edu> |
|
4939 | 2002-01-16 Fernando Perez <fperez@colorado.edu> | |
4934 |
|
4940 | |||
4935 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist |
|
4941 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist | |
4936 | to *not* include the last item given in a range. This brings their |
|
4942 | to *not* include the last item given in a range. This brings their | |
4937 | behavior in line with Python's slicing: |
|
4943 | behavior in line with Python's slicing: | |
4938 | a[n1:n2] -> a[n1]...a[n2-1] |
|
4944 | a[n1:n2] -> a[n1]...a[n2-1] | |
4939 | It may be a bit less convenient, but I prefer to stick to Python's |
|
4945 | It may be a bit less convenient, but I prefer to stick to Python's | |
4940 | conventions *everywhere*, so users never have to wonder. |
|
4946 | conventions *everywhere*, so users never have to wonder. | |
4941 | (Magic.magic_macro): Added @macro function to ease the creation of |
|
4947 | (Magic.magic_macro): Added @macro function to ease the creation of | |
4942 | macros. |
|
4948 | macros. | |
4943 |
|
4949 | |||
4944 | 2002-01-05 Fernando Perez <fperez@colorado.edu> |
|
4950 | 2002-01-05 Fernando Perez <fperez@colorado.edu> | |
4945 |
|
4951 | |||
4946 | * Released 0.2.4. |
|
4952 | * Released 0.2.4. | |
4947 |
|
4953 | |||
4948 | * IPython/iplib.py (Magic.magic_pdef): |
|
4954 | * IPython/iplib.py (Magic.magic_pdef): | |
4949 | (InteractiveShell.safe_execfile): report magic lines and error |
|
4955 | (InteractiveShell.safe_execfile): report magic lines and error | |
4950 | lines without line numbers so one can easily copy/paste them for |
|
4956 | lines without line numbers so one can easily copy/paste them for | |
4951 | re-execution. |
|
4957 | re-execution. | |
4952 |
|
4958 | |||
4953 | * Updated manual with recent changes. |
|
4959 | * Updated manual with recent changes. | |
4954 |
|
4960 | |||
4955 | * IPython/iplib.py (Magic.magic_oinfo): added constructor |
|
4961 | * IPython/iplib.py (Magic.magic_oinfo): added constructor | |
4956 | docstring printing when class? is called. Very handy for knowing |
|
4962 | docstring printing when class? is called. Very handy for knowing | |
4957 | how to create class instances (as long as __init__ is well |
|
4963 | how to create class instances (as long as __init__ is well | |
4958 | documented, of course :) |
|
4964 | documented, of course :) | |
4959 | (Magic.magic_doc): print both class and constructor docstrings. |
|
4965 | (Magic.magic_doc): print both class and constructor docstrings. | |
4960 | (Magic.magic_pdef): give constructor info if passed a class and |
|
4966 | (Magic.magic_pdef): give constructor info if passed a class and | |
4961 | __call__ info for callable object instances. |
|
4967 | __call__ info for callable object instances. | |
4962 |
|
4968 | |||
4963 | 2002-01-04 Fernando Perez <fperez@colorado.edu> |
|
4969 | 2002-01-04 Fernando Perez <fperez@colorado.edu> | |
4964 |
|
4970 | |||
4965 | * Made deep_reload() off by default. It doesn't always work |
|
4971 | * Made deep_reload() off by default. It doesn't always work | |
4966 | exactly as intended, so it's probably safer to have it off. It's |
|
4972 | exactly as intended, so it's probably safer to have it off. It's | |
4967 | still available as dreload() anyway, so nothing is lost. |
|
4973 | still available as dreload() anyway, so nothing is lost. | |
4968 |
|
4974 | |||
4969 | 2002-01-02 Fernando Perez <fperez@colorado.edu> |
|
4975 | 2002-01-02 Fernando Perez <fperez@colorado.edu> | |
4970 |
|
4976 | |||
4971 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, |
|
4977 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, | |
4972 | so I wanted an updated release). |
|
4978 | so I wanted an updated release). | |
4973 |
|
4979 | |||
4974 | 2001-12-27 Fernando Perez <fperez@colorado.edu> |
|
4980 | 2001-12-27 Fernando Perez <fperez@colorado.edu> | |
4975 |
|
4981 | |||
4976 | * IPython/iplib.py (InteractiveShell.interact): Added the original |
|
4982 | * IPython/iplib.py (InteractiveShell.interact): Added the original | |
4977 | code from 'code.py' for this module in order to change the |
|
4983 | code from 'code.py' for this module in order to change the | |
4978 | handling of a KeyboardInterrupt. This was necessary b/c otherwise |
|
4984 | handling of a KeyboardInterrupt. This was necessary b/c otherwise | |
4979 | the history cache would break when the user hit Ctrl-C, and |
|
4985 | the history cache would break when the user hit Ctrl-C, and | |
4980 | interact() offers no way to add any hooks to it. |
|
4986 | interact() offers no way to add any hooks to it. | |
4981 |
|
4987 | |||
4982 | 2001-12-23 Fernando Perez <fperez@colorado.edu> |
|
4988 | 2001-12-23 Fernando Perez <fperez@colorado.edu> | |
4983 |
|
4989 | |||
4984 | * setup.py: added check for 'MANIFEST' before trying to remove |
|
4990 | * setup.py: added check for 'MANIFEST' before trying to remove | |
4985 | it. Thanks to Sean Reifschneider. |
|
4991 | it. Thanks to Sean Reifschneider. | |
4986 |
|
4992 | |||
4987 | 2001-12-22 Fernando Perez <fperez@colorado.edu> |
|
4993 | 2001-12-22 Fernando Perez <fperez@colorado.edu> | |
4988 |
|
4994 | |||
4989 | * Released 0.2.2. |
|
4995 | * Released 0.2.2. | |
4990 |
|
4996 | |||
4991 | * Finished (reasonably) writing the manual. Later will add the |
|
4997 | * Finished (reasonably) writing the manual. Later will add the | |
4992 | python-standard navigation stylesheets, but for the time being |
|
4998 | python-standard navigation stylesheets, but for the time being | |
4993 | it's fairly complete. Distribution will include html and pdf |
|
4999 | it's fairly complete. Distribution will include html and pdf | |
4994 | versions. |
|
5000 | versions. | |
4995 |
|
5001 | |||
4996 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu |
|
5002 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu | |
4997 | (MayaVi author). |
|
5003 | (MayaVi author). | |
4998 |
|
5004 | |||
4999 | 2001-12-21 Fernando Perez <fperez@colorado.edu> |
|
5005 | 2001-12-21 Fernando Perez <fperez@colorado.edu> | |
5000 |
|
5006 | |||
5001 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a |
|
5007 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a | |
5002 | good public release, I think (with the manual and the distutils |
|
5008 | good public release, I think (with the manual and the distutils | |
5003 | installer). The manual can use some work, but that can go |
|
5009 | installer). The manual can use some work, but that can go | |
5004 | slowly. Otherwise I think it's quite nice for end users. Next |
|
5010 | slowly. Otherwise I think it's quite nice for end users. Next | |
5005 | summer, rewrite the guts of it... |
|
5011 | summer, rewrite the guts of it... | |
5006 |
|
5012 | |||
5007 | * Changed format of ipythonrc files to use whitespace as the |
|
5013 | * Changed format of ipythonrc files to use whitespace as the | |
5008 | separator instead of an explicit '='. Cleaner. |
|
5014 | separator instead of an explicit '='. Cleaner. | |
5009 |
|
5015 | |||
5010 | 2001-12-20 Fernando Perez <fperez@colorado.edu> |
|
5016 | 2001-12-20 Fernando Perez <fperez@colorado.edu> | |
5011 |
|
5017 | |||
5012 | * Started a manual in LyX. For now it's just a quick merge of the |
|
5018 | * Started a manual in LyX. For now it's just a quick merge of the | |
5013 | various internal docstrings and READMEs. Later it may grow into a |
|
5019 | various internal docstrings and READMEs. Later it may grow into a | |
5014 | nice, full-blown manual. |
|
5020 | nice, full-blown manual. | |
5015 |
|
5021 | |||
5016 | * Set up a distutils based installer. Installation should now be |
|
5022 | * Set up a distutils based installer. Installation should now be | |
5017 | trivially simple for end-users. |
|
5023 | trivially simple for end-users. | |
5018 |
|
5024 | |||
5019 | 2001-12-11 Fernando Perez <fperez@colorado.edu> |
|
5025 | 2001-12-11 Fernando Perez <fperez@colorado.edu> | |
5020 |
|
5026 | |||
5021 | * Released 0.2.0. First public release, announced it at |
|
5027 | * Released 0.2.0. First public release, announced it at | |
5022 | comp.lang.python. From now on, just bugfixes... |
|
5028 | comp.lang.python. From now on, just bugfixes... | |
5023 |
|
5029 | |||
5024 | * Went through all the files, set copyright/license notices and |
|
5030 | * Went through all the files, set copyright/license notices and | |
5025 | cleaned up things. Ready for release. |
|
5031 | cleaned up things. Ready for release. | |
5026 |
|
5032 | |||
5027 | 2001-12-10 Fernando Perez <fperez@colorado.edu> |
|
5033 | 2001-12-10 Fernando Perez <fperez@colorado.edu> | |
5028 |
|
5034 | |||
5029 | * Changed the first-time installer not to use tarfiles. It's more |
|
5035 | * Changed the first-time installer not to use tarfiles. It's more | |
5030 | robust now and less unix-dependent. Also makes it easier for |
|
5036 | robust now and less unix-dependent. Also makes it easier for | |
5031 | people to later upgrade versions. |
|
5037 | people to later upgrade versions. | |
5032 |
|
5038 | |||
5033 | * Changed @exit to @abort to reflect the fact that it's pretty |
|
5039 | * Changed @exit to @abort to reflect the fact that it's pretty | |
5034 | brutal (a sys.exit()). The difference between @abort and Ctrl-D |
|
5040 | brutal (a sys.exit()). The difference between @abort and Ctrl-D | |
5035 | becomes significant only when IPyhton is embedded: in that case, |
|
5041 | becomes significant only when IPyhton is embedded: in that case, | |
5036 | C-D closes IPython only, but @abort kills the enclosing program |
|
5042 | C-D closes IPython only, but @abort kills the enclosing program | |
5037 | too (unless it had called IPython inside a try catching |
|
5043 | too (unless it had called IPython inside a try catching | |
5038 | SystemExit). |
|
5044 | SystemExit). | |
5039 |
|
5045 | |||
5040 | * Created Shell module which exposes the actuall IPython Shell |
|
5046 | * Created Shell module which exposes the actuall IPython Shell | |
5041 | classes, currently the normal and the embeddable one. This at |
|
5047 | classes, currently the normal and the embeddable one. This at | |
5042 | least offers a stable interface we won't need to change when |
|
5048 | least offers a stable interface we won't need to change when | |
5043 | (later) the internals are rewritten. That rewrite will be confined |
|
5049 | (later) the internals are rewritten. That rewrite will be confined | |
5044 | to iplib and ipmaker, but the Shell interface should remain as is. |
|
5050 | to iplib and ipmaker, but the Shell interface should remain as is. | |
5045 |
|
5051 | |||
5046 | * Added embed module which offers an embeddable IPShell object, |
|
5052 | * Added embed module which offers an embeddable IPShell object, | |
5047 | useful to fire up IPython *inside* a running program. Great for |
|
5053 | useful to fire up IPython *inside* a running program. Great for | |
5048 | debugging or dynamical data analysis. |
|
5054 | debugging or dynamical data analysis. | |
5049 |
|
5055 | |||
5050 | 2001-12-08 Fernando Perez <fperez@colorado.edu> |
|
5056 | 2001-12-08 Fernando Perez <fperez@colorado.edu> | |
5051 |
|
5057 | |||
5052 | * Fixed small bug preventing seeing info from methods of defined |
|
5058 | * Fixed small bug preventing seeing info from methods of defined | |
5053 | objects (incorrect namespace in _ofind()). |
|
5059 | objects (incorrect namespace in _ofind()). | |
5054 |
|
5060 | |||
5055 | * Documentation cleanup. Moved the main usage docstrings to a |
|
5061 | * Documentation cleanup. Moved the main usage docstrings to a | |
5056 | separate file, usage.py (cleaner to maintain, and hopefully in the |
|
5062 | separate file, usage.py (cleaner to maintain, and hopefully in the | |
5057 | future some perlpod-like way of producing interactive, man and |
|
5063 | future some perlpod-like way of producing interactive, man and | |
5058 | html docs out of it will be found). |
|
5064 | html docs out of it will be found). | |
5059 |
|
5065 | |||
5060 | * Added @profile to see your profile at any time. |
|
5066 | * Added @profile to see your profile at any time. | |
5061 |
|
5067 | |||
5062 | * Added @p as an alias for 'print'. It's especially convenient if |
|
5068 | * Added @p as an alias for 'print'. It's especially convenient if | |
5063 | using automagic ('p x' prints x). |
|
5069 | using automagic ('p x' prints x). | |
5064 |
|
5070 | |||
5065 | * Small cleanups and fixes after a pychecker run. |
|
5071 | * Small cleanups and fixes after a pychecker run. | |
5066 |
|
5072 | |||
5067 | * Changed the @cd command to handle @cd - and @cd -<n> for |
|
5073 | * Changed the @cd command to handle @cd - and @cd -<n> for | |
5068 | visiting any directory in _dh. |
|
5074 | visiting any directory in _dh. | |
5069 |
|
5075 | |||
5070 | * Introduced _dh, a history of visited directories. @dhist prints |
|
5076 | * Introduced _dh, a history of visited directories. @dhist prints | |
5071 | it out with numbers. |
|
5077 | it out with numbers. | |
5072 |
|
5078 | |||
5073 | 2001-12-07 Fernando Perez <fperez@colorado.edu> |
|
5079 | 2001-12-07 Fernando Perez <fperez@colorado.edu> | |
5074 |
|
5080 | |||
5075 | * Released 0.1.22 |
|
5081 | * Released 0.1.22 | |
5076 |
|
5082 | |||
5077 | * Made initialization a bit more robust against invalid color |
|
5083 | * Made initialization a bit more robust against invalid color | |
5078 | options in user input (exit, not traceback-crash). |
|
5084 | options in user input (exit, not traceback-crash). | |
5079 |
|
5085 | |||
5080 | * Changed the bug crash reporter to write the report only in the |
|
5086 | * Changed the bug crash reporter to write the report only in the | |
5081 | user's .ipython directory. That way IPython won't litter people's |
|
5087 | user's .ipython directory. That way IPython won't litter people's | |
5082 | hard disks with crash files all over the place. Also print on |
|
5088 | hard disks with crash files all over the place. Also print on | |
5083 | screen the necessary mail command. |
|
5089 | screen the necessary mail command. | |
5084 |
|
5090 | |||
5085 | * With the new ultraTB, implemented LightBG color scheme for light |
|
5091 | * With the new ultraTB, implemented LightBG color scheme for light | |
5086 | background terminals. A lot of people like white backgrounds, so I |
|
5092 | background terminals. A lot of people like white backgrounds, so I | |
5087 | guess we should at least give them something readable. |
|
5093 | guess we should at least give them something readable. | |
5088 |
|
5094 | |||
5089 | 2001-12-06 Fernando Perez <fperez@colorado.edu> |
|
5095 | 2001-12-06 Fernando Perez <fperez@colorado.edu> | |
5090 |
|
5096 | |||
5091 | * Modified the structure of ultraTB. Now there's a proper class |
|
5097 | * Modified the structure of ultraTB. Now there's a proper class | |
5092 | for tables of color schemes which allow adding schemes easily and |
|
5098 | for tables of color schemes which allow adding schemes easily and | |
5093 | switching the active scheme without creating a new instance every |
|
5099 | switching the active scheme without creating a new instance every | |
5094 | time (which was ridiculous). The syntax for creating new schemes |
|
5100 | time (which was ridiculous). The syntax for creating new schemes | |
5095 | is also cleaner. I think ultraTB is finally done, with a clean |
|
5101 | is also cleaner. I think ultraTB is finally done, with a clean | |
5096 | class structure. Names are also much cleaner (now there's proper |
|
5102 | class structure. Names are also much cleaner (now there's proper | |
5097 | color tables, no need for every variable to also have 'color' in |
|
5103 | color tables, no need for every variable to also have 'color' in | |
5098 | its name). |
|
5104 | its name). | |
5099 |
|
5105 | |||
5100 | * Broke down genutils into separate files. Now genutils only |
|
5106 | * Broke down genutils into separate files. Now genutils only | |
5101 | contains utility functions, and classes have been moved to their |
|
5107 | contains utility functions, and classes have been moved to their | |
5102 | own files (they had enough independent functionality to warrant |
|
5108 | own files (they had enough independent functionality to warrant | |
5103 | it): ConfigLoader, OutputTrap, Struct. |
|
5109 | it): ConfigLoader, OutputTrap, Struct. | |
5104 |
|
5110 | |||
5105 | 2001-12-05 Fernando Perez <fperez@colorado.edu> |
|
5111 | 2001-12-05 Fernando Perez <fperez@colorado.edu> | |
5106 |
|
5112 | |||
5107 | * IPython turns 21! Released version 0.1.21, as a candidate for |
|
5113 | * IPython turns 21! Released version 0.1.21, as a candidate for | |
5108 | public consumption. If all goes well, release in a few days. |
|
5114 | public consumption. If all goes well, release in a few days. | |
5109 |
|
5115 | |||
5110 | * Fixed path bug (files in Extensions/ directory wouldn't be found |
|
5116 | * Fixed path bug (files in Extensions/ directory wouldn't be found | |
5111 | unless IPython/ was explicitly in sys.path). |
|
5117 | unless IPython/ was explicitly in sys.path). | |
5112 |
|
5118 | |||
5113 | * Extended the FlexCompleter class as MagicCompleter to allow |
|
5119 | * Extended the FlexCompleter class as MagicCompleter to allow | |
5114 | completion of @-starting lines. |
|
5120 | completion of @-starting lines. | |
5115 |
|
5121 | |||
5116 | * Created __release__.py file as a central repository for release |
|
5122 | * Created __release__.py file as a central repository for release | |
5117 | info that other files can read from. |
|
5123 | info that other files can read from. | |
5118 |
|
5124 | |||
5119 | * Fixed small bug in logging: when logging was turned on in |
|
5125 | * Fixed small bug in logging: when logging was turned on in | |
5120 | mid-session, old lines with special meanings (!@?) were being |
|
5126 | mid-session, old lines with special meanings (!@?) were being | |
5121 | logged without the prepended comment, which is necessary since |
|
5127 | logged without the prepended comment, which is necessary since | |
5122 | they are not truly valid python syntax. This should make session |
|
5128 | they are not truly valid python syntax. This should make session | |
5123 | restores produce less errors. |
|
5129 | restores produce less errors. | |
5124 |
|
5130 | |||
5125 | * The namespace cleanup forced me to make a FlexCompleter class |
|
5131 | * The namespace cleanup forced me to make a FlexCompleter class | |
5126 | which is nothing but a ripoff of rlcompleter, but with selectable |
|
5132 | which is nothing but a ripoff of rlcompleter, but with selectable | |
5127 | namespace (rlcompleter only works in __main__.__dict__). I'll try |
|
5133 | namespace (rlcompleter only works in __main__.__dict__). I'll try | |
5128 | to submit a note to the authors to see if this change can be |
|
5134 | to submit a note to the authors to see if this change can be | |
5129 | incorporated in future rlcompleter releases (Dec.6: done) |
|
5135 | incorporated in future rlcompleter releases (Dec.6: done) | |
5130 |
|
5136 | |||
5131 | * More fixes to namespace handling. It was a mess! Now all |
|
5137 | * More fixes to namespace handling. It was a mess! Now all | |
5132 | explicit references to __main__.__dict__ are gone (except when |
|
5138 | explicit references to __main__.__dict__ are gone (except when | |
5133 | really needed) and everything is handled through the namespace |
|
5139 | really needed) and everything is handled through the namespace | |
5134 | dicts in the IPython instance. We seem to be getting somewhere |
|
5140 | dicts in the IPython instance. We seem to be getting somewhere | |
5135 | with this, finally... |
|
5141 | with this, finally... | |
5136 |
|
5142 | |||
5137 | * Small documentation updates. |
|
5143 | * Small documentation updates. | |
5138 |
|
5144 | |||
5139 | * Created the Extensions directory under IPython (with an |
|
5145 | * Created the Extensions directory under IPython (with an | |
5140 | __init__.py). Put the PhysicalQ stuff there. This directory should |
|
5146 | __init__.py). Put the PhysicalQ stuff there. This directory should | |
5141 | be used for all special-purpose extensions. |
|
5147 | be used for all special-purpose extensions. | |
5142 |
|
5148 | |||
5143 | * File renaming: |
|
5149 | * File renaming: | |
5144 | ipythonlib --> ipmaker |
|
5150 | ipythonlib --> ipmaker | |
5145 | ipplib --> iplib |
|
5151 | ipplib --> iplib | |
5146 | This makes a bit more sense in terms of what these files actually do. |
|
5152 | This makes a bit more sense in terms of what these files actually do. | |
5147 |
|
5153 | |||
5148 | * Moved all the classes and functions in ipythonlib to ipplib, so |
|
5154 | * Moved all the classes and functions in ipythonlib to ipplib, so | |
5149 | now ipythonlib only has make_IPython(). This will ease up its |
|
5155 | now ipythonlib only has make_IPython(). This will ease up its | |
5150 | splitting in smaller functional chunks later. |
|
5156 | splitting in smaller functional chunks later. | |
5151 |
|
5157 | |||
5152 | * Cleaned up (done, I think) output of @whos. Better column |
|
5158 | * Cleaned up (done, I think) output of @whos. Better column | |
5153 | formatting, and now shows str(var) for as much as it can, which is |
|
5159 | formatting, and now shows str(var) for as much as it can, which is | |
5154 | typically what one gets with a 'print var'. |
|
5160 | typically what one gets with a 'print var'. | |
5155 |
|
5161 | |||
5156 | 2001-12-04 Fernando Perez <fperez@colorado.edu> |
|
5162 | 2001-12-04 Fernando Perez <fperez@colorado.edu> | |
5157 |
|
5163 | |||
5158 | * Fixed namespace problems. Now builtin/IPyhton/user names get |
|
5164 | * Fixed namespace problems. Now builtin/IPyhton/user names get | |
5159 | properly reported in their namespace. Internal namespace handling |
|
5165 | properly reported in their namespace. Internal namespace handling | |
5160 | is finally getting decent (not perfect yet, but much better than |
|
5166 | is finally getting decent (not perfect yet, but much better than | |
5161 | the ad-hoc mess we had). |
|
5167 | the ad-hoc mess we had). | |
5162 |
|
5168 | |||
5163 | * Removed -exit option. If people just want to run a python |
|
5169 | * Removed -exit option. If people just want to run a python | |
5164 | script, that's what the normal interpreter is for. Less |
|
5170 | script, that's what the normal interpreter is for. Less | |
5165 | unnecessary options, less chances for bugs. |
|
5171 | unnecessary options, less chances for bugs. | |
5166 |
|
5172 | |||
5167 | * Added a crash handler which generates a complete post-mortem if |
|
5173 | * Added a crash handler which generates a complete post-mortem if | |
5168 | IPython crashes. This will help a lot in tracking bugs down the |
|
5174 | IPython crashes. This will help a lot in tracking bugs down the | |
5169 | road. |
|
5175 | road. | |
5170 |
|
5176 | |||
5171 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names |
|
5177 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names | |
5172 | which were boud to functions being reassigned would bypass the |
|
5178 | which were boud to functions being reassigned would bypass the | |
5173 | logger, breaking the sync of _il with the prompt counter. This |
|
5179 | logger, breaking the sync of _il with the prompt counter. This | |
5174 | would then crash IPython later when a new line was logged. |
|
5180 | would then crash IPython later when a new line was logged. | |
5175 |
|
5181 | |||
5176 | 2001-12-02 Fernando Perez <fperez@colorado.edu> |
|
5182 | 2001-12-02 Fernando Perez <fperez@colorado.edu> | |
5177 |
|
5183 | |||
5178 | * Made IPython a package. This means people don't have to clutter |
|
5184 | * Made IPython a package. This means people don't have to clutter | |
5179 | their sys.path with yet another directory. Changed the INSTALL |
|
5185 | their sys.path with yet another directory. Changed the INSTALL | |
5180 | file accordingly. |
|
5186 | file accordingly. | |
5181 |
|
5187 | |||
5182 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now |
|
5188 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now | |
5183 | sorts its output (so @who shows it sorted) and @whos formats the |
|
5189 | sorts its output (so @who shows it sorted) and @whos formats the | |
5184 | table according to the width of the first column. Nicer, easier to |
|
5190 | table according to the width of the first column. Nicer, easier to | |
5185 | read. Todo: write a generic table_format() which takes a list of |
|
5191 | read. Todo: write a generic table_format() which takes a list of | |
5186 | lists and prints it nicely formatted, with optional row/column |
|
5192 | lists and prints it nicely formatted, with optional row/column | |
5187 | separators and proper padding and justification. |
|
5193 | separators and proper padding and justification. | |
5188 |
|
5194 | |||
5189 | * Released 0.1.20 |
|
5195 | * Released 0.1.20 | |
5190 |
|
5196 | |||
5191 | * Fixed bug in @log which would reverse the inputcache list (a |
|
5197 | * Fixed bug in @log which would reverse the inputcache list (a | |
5192 | copy operation was missing). |
|
5198 | copy operation was missing). | |
5193 |
|
5199 | |||
5194 | * Code cleanup. @config was changed to use page(). Better, since |
|
5200 | * Code cleanup. @config was changed to use page(). Better, since | |
5195 | its output is always quite long. |
|
5201 | its output is always quite long. | |
5196 |
|
5202 | |||
5197 | * Itpl is back as a dependency. I was having too many problems |
|
5203 | * Itpl is back as a dependency. I was having too many problems | |
5198 | getting the parametric aliases to work reliably, and it's just |
|
5204 | getting the parametric aliases to work reliably, and it's just | |
5199 | easier to code weird string operations with it than playing %()s |
|
5205 | easier to code weird string operations with it than playing %()s | |
5200 | games. It's only ~6k, so I don't think it's too big a deal. |
|
5206 | games. It's only ~6k, so I don't think it's too big a deal. | |
5201 |
|
5207 | |||
5202 | * Found (and fixed) a very nasty bug with history. !lines weren't |
|
5208 | * Found (and fixed) a very nasty bug with history. !lines weren't | |
5203 | getting cached, and the out of sync caches would crash |
|
5209 | getting cached, and the out of sync caches would crash | |
5204 | IPython. Fixed it by reorganizing the prefilter/handlers/logger |
|
5210 | IPython. Fixed it by reorganizing the prefilter/handlers/logger | |
5205 | division of labor a bit better. Bug fixed, cleaner structure. |
|
5211 | division of labor a bit better. Bug fixed, cleaner structure. | |
5206 |
|
5212 | |||
5207 | 2001-12-01 Fernando Perez <fperez@colorado.edu> |
|
5213 | 2001-12-01 Fernando Perez <fperez@colorado.edu> | |
5208 |
|
5214 | |||
5209 | * Released 0.1.19 |
|
5215 | * Released 0.1.19 | |
5210 |
|
5216 | |||
5211 | * Added option -n to @hist to prevent line number printing. Much |
|
5217 | * Added option -n to @hist to prevent line number printing. Much | |
5212 | easier to copy/paste code this way. |
|
5218 | easier to copy/paste code this way. | |
5213 |
|
5219 | |||
5214 | * Created global _il to hold the input list. Allows easy |
|
5220 | * Created global _il to hold the input list. Allows easy | |
5215 | re-execution of blocks of code by slicing it (inspired by Janko's |
|
5221 | re-execution of blocks of code by slicing it (inspired by Janko's | |
5216 | comment on 'macros'). |
|
5222 | comment on 'macros'). | |
5217 |
|
5223 | |||
5218 | * Small fixes and doc updates. |
|
5224 | * Small fixes and doc updates. | |
5219 |
|
5225 | |||
5220 | * Rewrote @history function (was @h). Renamed it to @hist, @h is |
|
5226 | * Rewrote @history function (was @h). Renamed it to @hist, @h is | |
5221 | much too fragile with automagic. Handles properly multi-line |
|
5227 | much too fragile with automagic. Handles properly multi-line | |
5222 | statements and takes parameters. |
|
5228 | statements and takes parameters. | |
5223 |
|
5229 | |||
5224 | 2001-11-30 Fernando Perez <fperez@colorado.edu> |
|
5230 | 2001-11-30 Fernando Perez <fperez@colorado.edu> | |
5225 |
|
5231 | |||
5226 | * Version 0.1.18 released. |
|
5232 | * Version 0.1.18 released. | |
5227 |
|
5233 | |||
5228 | * Fixed nasty namespace bug in initial module imports. |
|
5234 | * Fixed nasty namespace bug in initial module imports. | |
5229 |
|
5235 | |||
5230 | * Added copyright/license notes to all code files (except |
|
5236 | * Added copyright/license notes to all code files (except | |
5231 | DPyGetOpt). For the time being, LGPL. That could change. |
|
5237 | DPyGetOpt). For the time being, LGPL. That could change. | |
5232 |
|
5238 | |||
5233 | * Rewrote a much nicer README, updated INSTALL, cleaned up |
|
5239 | * Rewrote a much nicer README, updated INSTALL, cleaned up | |
5234 | ipythonrc-* samples. |
|
5240 | ipythonrc-* samples. | |
5235 |
|
5241 | |||
5236 | * Overall code/documentation cleanup. Basically ready for |
|
5242 | * Overall code/documentation cleanup. Basically ready for | |
5237 | release. Only remaining thing: licence decision (LGPL?). |
|
5243 | release. Only remaining thing: licence decision (LGPL?). | |
5238 |
|
5244 | |||
5239 | * Converted load_config to a class, ConfigLoader. Now recursion |
|
5245 | * Converted load_config to a class, ConfigLoader. Now recursion | |
5240 | control is better organized. Doesn't include the same file twice. |
|
5246 | control is better organized. Doesn't include the same file twice. | |
5241 |
|
5247 | |||
5242 | 2001-11-29 Fernando Perez <fperez@colorado.edu> |
|
5248 | 2001-11-29 Fernando Perez <fperez@colorado.edu> | |
5243 |
|
5249 | |||
5244 | * Got input history working. Changed output history variables from |
|
5250 | * Got input history working. Changed output history variables from | |
5245 | _p to _o so that _i is for input and _o for output. Just cleaner |
|
5251 | _p to _o so that _i is for input and _o for output. Just cleaner | |
5246 | convention. |
|
5252 | convention. | |
5247 |
|
5253 | |||
5248 | * Implemented parametric aliases. This pretty much allows the |
|
5254 | * Implemented parametric aliases. This pretty much allows the | |
5249 | alias system to offer full-blown shell convenience, I think. |
|
5255 | alias system to offer full-blown shell convenience, I think. | |
5250 |
|
5256 | |||
5251 | * Version 0.1.17 released, 0.1.18 opened. |
|
5257 | * Version 0.1.17 released, 0.1.18 opened. | |
5252 |
|
5258 | |||
5253 | * dot_ipython/ipythonrc (alias): added documentation. |
|
5259 | * dot_ipython/ipythonrc (alias): added documentation. | |
5254 | (xcolor): Fixed small bug (xcolors -> xcolor) |
|
5260 | (xcolor): Fixed small bug (xcolors -> xcolor) | |
5255 |
|
5261 | |||
5256 | * Changed the alias system. Now alias is a magic command to define |
|
5262 | * Changed the alias system. Now alias is a magic command to define | |
5257 | aliases just like the shell. Rationale: the builtin magics should |
|
5263 | aliases just like the shell. Rationale: the builtin magics should | |
5258 | be there for things deeply connected to IPython's |
|
5264 | be there for things deeply connected to IPython's | |
5259 | architecture. And this is a much lighter system for what I think |
|
5265 | architecture. And this is a much lighter system for what I think | |
5260 | is the really important feature: allowing users to define quickly |
|
5266 | is the really important feature: allowing users to define quickly | |
5261 | magics that will do shell things for them, so they can customize |
|
5267 | magics that will do shell things for them, so they can customize | |
5262 | IPython easily to match their work habits. If someone is really |
|
5268 | IPython easily to match their work habits. If someone is really | |
5263 | desperate to have another name for a builtin alias, they can |
|
5269 | desperate to have another name for a builtin alias, they can | |
5264 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but |
|
5270 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but | |
5265 | works. |
|
5271 | works. | |
5266 |
|
5272 | |||
5267 | 2001-11-28 Fernando Perez <fperez@colorado.edu> |
|
5273 | 2001-11-28 Fernando Perez <fperez@colorado.edu> | |
5268 |
|
5274 | |||
5269 | * Changed @file so that it opens the source file at the proper |
|
5275 | * Changed @file so that it opens the source file at the proper | |
5270 | line. Since it uses less, if your EDITOR environment is |
|
5276 | line. Since it uses less, if your EDITOR environment is | |
5271 | configured, typing v will immediately open your editor of choice |
|
5277 | configured, typing v will immediately open your editor of choice | |
5272 | right at the line where the object is defined. Not as quick as |
|
5278 | right at the line where the object is defined. Not as quick as | |
5273 | having a direct @edit command, but for all intents and purposes it |
|
5279 | having a direct @edit command, but for all intents and purposes it | |
5274 | works. And I don't have to worry about writing @edit to deal with |
|
5280 | works. And I don't have to worry about writing @edit to deal with | |
5275 | all the editors, less does that. |
|
5281 | all the editors, less does that. | |
5276 |
|
5282 | |||
5277 | * Version 0.1.16 released, 0.1.17 opened. |
|
5283 | * Version 0.1.16 released, 0.1.17 opened. | |
5278 |
|
5284 | |||
5279 | * Fixed some nasty bugs in the page/page_dumb combo that could |
|
5285 | * Fixed some nasty bugs in the page/page_dumb combo that could | |
5280 | crash IPython. |
|
5286 | crash IPython. | |
5281 |
|
5287 | |||
5282 | 2001-11-27 Fernando Perez <fperez@colorado.edu> |
|
5288 | 2001-11-27 Fernando Perez <fperez@colorado.edu> | |
5283 |
|
5289 | |||
5284 | * Version 0.1.15 released, 0.1.16 opened. |
|
5290 | * Version 0.1.15 released, 0.1.16 opened. | |
5285 |
|
5291 | |||
5286 | * Finally got ? and ?? to work for undefined things: now it's |
|
5292 | * Finally got ? and ?? to work for undefined things: now it's | |
5287 | possible to type {}.get? and get information about the get method |
|
5293 | possible to type {}.get? and get information about the get method | |
5288 | of dicts, or os.path? even if only os is defined (so technically |
|
5294 | of dicts, or os.path? even if only os is defined (so technically | |
5289 | os.path isn't). Works at any level. For example, after import os, |
|
5295 | os.path isn't). Works at any level. For example, after import os, | |
5290 | os?, os.path?, os.path.abspath? all work. This is great, took some |
|
5296 | os?, os.path?, os.path.abspath? all work. This is great, took some | |
5291 | work in _ofind. |
|
5297 | work in _ofind. | |
5292 |
|
5298 | |||
5293 | * Fixed more bugs with logging. The sanest way to do it was to add |
|
5299 | * Fixed more bugs with logging. The sanest way to do it was to add | |
5294 | to @log a 'mode' parameter. Killed two in one shot (this mode |
|
5300 | to @log a 'mode' parameter. Killed two in one shot (this mode | |
5295 | option was a request of Janko's). I think it's finally clean |
|
5301 | option was a request of Janko's). I think it's finally clean | |
5296 | (famous last words). |
|
5302 | (famous last words). | |
5297 |
|
5303 | |||
5298 | * Added a page_dumb() pager which does a decent job of paging on |
|
5304 | * Added a page_dumb() pager which does a decent job of paging on | |
5299 | screen, if better things (like less) aren't available. One less |
|
5305 | screen, if better things (like less) aren't available. One less | |
5300 | unix dependency (someday maybe somebody will port this to |
|
5306 | unix dependency (someday maybe somebody will port this to | |
5301 | windows). |
|
5307 | windows). | |
5302 |
|
5308 | |||
5303 | * Fixed problem in magic_log: would lock of logging out if log |
|
5309 | * Fixed problem in magic_log: would lock of logging out if log | |
5304 | creation failed (because it would still think it had succeeded). |
|
5310 | creation failed (because it would still think it had succeeded). | |
5305 |
|
5311 | |||
5306 | * Improved the page() function using curses to auto-detect screen |
|
5312 | * Improved the page() function using curses to auto-detect screen | |
5307 | size. Now it can make a much better decision on whether to print |
|
5313 | size. Now it can make a much better decision on whether to print | |
5308 | or page a string. Option screen_length was modified: a value 0 |
|
5314 | or page a string. Option screen_length was modified: a value 0 | |
5309 | means auto-detect, and that's the default now. |
|
5315 | means auto-detect, and that's the default now. | |
5310 |
|
5316 | |||
5311 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to |
|
5317 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to | |
5312 | go out. I'll test it for a few days, then talk to Janko about |
|
5318 | go out. I'll test it for a few days, then talk to Janko about | |
5313 | licences and announce it. |
|
5319 | licences and announce it. | |
5314 |
|
5320 | |||
5315 | * Fixed the length of the auto-generated ---> prompt which appears |
|
5321 | * Fixed the length of the auto-generated ---> prompt which appears | |
5316 | for auto-parens and auto-quotes. Getting this right isn't trivial, |
|
5322 | for auto-parens and auto-quotes. Getting this right isn't trivial, | |
5317 | with all the color escapes, different prompt types and optional |
|
5323 | with all the color escapes, different prompt types and optional | |
5318 | separators. But it seems to be working in all the combinations. |
|
5324 | separators. But it seems to be working in all the combinations. | |
5319 |
|
5325 | |||
5320 | 2001-11-26 Fernando Perez <fperez@colorado.edu> |
|
5326 | 2001-11-26 Fernando Perez <fperez@colorado.edu> | |
5321 |
|
5327 | |||
5322 | * Wrote a regexp filter to get option types from the option names |
|
5328 | * Wrote a regexp filter to get option types from the option names | |
5323 | string. This eliminates the need to manually keep two duplicate |
|
5329 | string. This eliminates the need to manually keep two duplicate | |
5324 | lists. |
|
5330 | lists. | |
5325 |
|
5331 | |||
5326 | * Removed the unneeded check_option_names. Now options are handled |
|
5332 | * Removed the unneeded check_option_names. Now options are handled | |
5327 | in a much saner manner and it's easy to visually check that things |
|
5333 | in a much saner manner and it's easy to visually check that things | |
5328 | are ok. |
|
5334 | are ok. | |
5329 |
|
5335 | |||
5330 | * Updated version numbers on all files I modified to carry a |
|
5336 | * Updated version numbers on all files I modified to carry a | |
5331 | notice so Janko and Nathan have clear version markers. |
|
5337 | notice so Janko and Nathan have clear version markers. | |
5332 |
|
5338 | |||
5333 | * Updated docstring for ultraTB with my changes. I should send |
|
5339 | * Updated docstring for ultraTB with my changes. I should send | |
5334 | this to Nathan. |
|
5340 | this to Nathan. | |
5335 |
|
5341 | |||
5336 | * Lots of small fixes. Ran everything through pychecker again. |
|
5342 | * Lots of small fixes. Ran everything through pychecker again. | |
5337 |
|
5343 | |||
5338 | * Made loading of deep_reload an cmd line option. If it's not too |
|
5344 | * Made loading of deep_reload an cmd line option. If it's not too | |
5339 | kosher, now people can just disable it. With -nodeep_reload it's |
|
5345 | kosher, now people can just disable it. With -nodeep_reload it's | |
5340 | still available as dreload(), it just won't overwrite reload(). |
|
5346 | still available as dreload(), it just won't overwrite reload(). | |
5341 |
|
5347 | |||
5342 | * Moved many options to the no| form (-opt and -noopt |
|
5348 | * Moved many options to the no| form (-opt and -noopt | |
5343 | accepted). Cleaner. |
|
5349 | accepted). Cleaner. | |
5344 |
|
5350 | |||
5345 | * Changed magic_log so that if called with no parameters, it uses |
|
5351 | * Changed magic_log so that if called with no parameters, it uses | |
5346 | 'rotate' mode. That way auto-generated logs aren't automatically |
|
5352 | 'rotate' mode. That way auto-generated logs aren't automatically | |
5347 | over-written. For normal logs, now a backup is made if it exists |
|
5353 | over-written. For normal logs, now a backup is made if it exists | |
5348 | (only 1 level of backups). A new 'backup' mode was added to the |
|
5354 | (only 1 level of backups). A new 'backup' mode was added to the | |
5349 | Logger class to support this. This was a request by Janko. |
|
5355 | Logger class to support this. This was a request by Janko. | |
5350 |
|
5356 | |||
5351 | * Added @logoff/@logon to stop/restart an active log. |
|
5357 | * Added @logoff/@logon to stop/restart an active log. | |
5352 |
|
5358 | |||
5353 | * Fixed a lot of bugs in log saving/replay. It was pretty |
|
5359 | * Fixed a lot of bugs in log saving/replay. It was pretty | |
5354 | broken. Now special lines (!@,/) appear properly in the command |
|
5360 | broken. Now special lines (!@,/) appear properly in the command | |
5355 | history after a log replay. |
|
5361 | history after a log replay. | |
5356 |
|
5362 | |||
5357 | * Tried and failed to implement full session saving via pickle. My |
|
5363 | * Tried and failed to implement full session saving via pickle. My | |
5358 | idea was to pickle __main__.__dict__, but modules can't be |
|
5364 | idea was to pickle __main__.__dict__, but modules can't be | |
5359 | pickled. This would be a better alternative to replaying logs, but |
|
5365 | pickled. This would be a better alternative to replaying logs, but | |
5360 | seems quite tricky to get to work. Changed -session to be called |
|
5366 | seems quite tricky to get to work. Changed -session to be called | |
5361 | -logplay, which more accurately reflects what it does. And if we |
|
5367 | -logplay, which more accurately reflects what it does. And if we | |
5362 | ever get real session saving working, -session is now available. |
|
5368 | ever get real session saving working, -session is now available. | |
5363 |
|
5369 | |||
5364 | * Implemented color schemes for prompts also. As for tracebacks, |
|
5370 | * Implemented color schemes for prompts also. As for tracebacks, | |
5365 | currently only NoColor and Linux are supported. But now the |
|
5371 | currently only NoColor and Linux are supported. But now the | |
5366 | infrastructure is in place, based on a generic ColorScheme |
|
5372 | infrastructure is in place, based on a generic ColorScheme | |
5367 | class. So writing and activating new schemes both for the prompts |
|
5373 | class. So writing and activating new schemes both for the prompts | |
5368 | and the tracebacks should be straightforward. |
|
5374 | and the tracebacks should be straightforward. | |
5369 |
|
5375 | |||
5370 | * Version 0.1.13 released, 0.1.14 opened. |
|
5376 | * Version 0.1.13 released, 0.1.14 opened. | |
5371 |
|
5377 | |||
5372 | * Changed handling of options for output cache. Now counter is |
|
5378 | * Changed handling of options for output cache. Now counter is | |
5373 | hardwired starting at 1 and one specifies the maximum number of |
|
5379 | hardwired starting at 1 and one specifies the maximum number of | |
5374 | entries *in the outcache* (not the max prompt counter). This is |
|
5380 | entries *in the outcache* (not the max prompt counter). This is | |
5375 | much better, since many statements won't increase the cache |
|
5381 | much better, since many statements won't increase the cache | |
5376 | count. It also eliminated some confusing options, now there's only |
|
5382 | count. It also eliminated some confusing options, now there's only | |
5377 | one: cache_size. |
|
5383 | one: cache_size. | |
5378 |
|
5384 | |||
5379 | * Added 'alias' magic function and magic_alias option in the |
|
5385 | * Added 'alias' magic function and magic_alias option in the | |
5380 | ipythonrc file. Now the user can easily define whatever names he |
|
5386 | ipythonrc file. Now the user can easily define whatever names he | |
5381 | wants for the magic functions without having to play weird |
|
5387 | wants for the magic functions without having to play weird | |
5382 | namespace games. This gives IPython a real shell-like feel. |
|
5388 | namespace games. This gives IPython a real shell-like feel. | |
5383 |
|
5389 | |||
5384 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit |
|
5390 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit | |
5385 | @ or not). |
|
5391 | @ or not). | |
5386 |
|
5392 | |||
5387 | This was one of the last remaining 'visible' bugs (that I know |
|
5393 | This was one of the last remaining 'visible' bugs (that I know | |
5388 | of). I think if I can clean up the session loading so it works |
|
5394 | of). I think if I can clean up the session loading so it works | |
5389 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first |
|
5395 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first | |
5390 | about licensing). |
|
5396 | about licensing). | |
5391 |
|
5397 | |||
5392 | 2001-11-25 Fernando Perez <fperez@colorado.edu> |
|
5398 | 2001-11-25 Fernando Perez <fperez@colorado.edu> | |
5393 |
|
5399 | |||
5394 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and |
|
5400 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and | |
5395 | there's a cleaner distinction between what ? and ?? show. |
|
5401 | there's a cleaner distinction between what ? and ?? show. | |
5396 |
|
5402 | |||
5397 | * Added screen_length option. Now the user can define his own |
|
5403 | * Added screen_length option. Now the user can define his own | |
5398 | screen size for page() operations. |
|
5404 | screen size for page() operations. | |
5399 |
|
5405 | |||
5400 | * Implemented magic shell-like functions with automatic code |
|
5406 | * Implemented magic shell-like functions with automatic code | |
5401 | generation. Now adding another function is just a matter of adding |
|
5407 | generation. Now adding another function is just a matter of adding | |
5402 | an entry to a dict, and the function is dynamically generated at |
|
5408 | an entry to a dict, and the function is dynamically generated at | |
5403 | run-time. Python has some really cool features! |
|
5409 | run-time. Python has some really cool features! | |
5404 |
|
5410 | |||
5405 | * Renamed many options to cleanup conventions a little. Now all |
|
5411 | * Renamed many options to cleanup conventions a little. Now all | |
5406 | are lowercase, and only underscores where needed. Also in the code |
|
5412 | are lowercase, and only underscores where needed. Also in the code | |
5407 | option name tables are clearer. |
|
5413 | option name tables are clearer. | |
5408 |
|
5414 | |||
5409 | * Changed prompts a little. Now input is 'In [n]:' instead of |
|
5415 | * Changed prompts a little. Now input is 'In [n]:' instead of | |
5410 | 'In[n]:='. This allows it the numbers to be aligned with the |
|
5416 | 'In[n]:='. This allows it the numbers to be aligned with the | |
5411 | Out[n] numbers, and removes usage of ':=' which doesn't exist in |
|
5417 | Out[n] numbers, and removes usage of ':=' which doesn't exist in | |
5412 | Python (it was a Mathematica thing). The '...' continuation prompt |
|
5418 | Python (it was a Mathematica thing). The '...' continuation prompt | |
5413 | was also changed a little to align better. |
|
5419 | was also changed a little to align better. | |
5414 |
|
5420 | |||
5415 | * Fixed bug when flushing output cache. Not all _p<n> variables |
|
5421 | * Fixed bug when flushing output cache. Not all _p<n> variables | |
5416 | exist, so their deletion needs to be wrapped in a try: |
|
5422 | exist, so their deletion needs to be wrapped in a try: | |
5417 |
|
5423 | |||
5418 | * Figured out how to properly use inspect.formatargspec() (it |
|
5424 | * Figured out how to properly use inspect.formatargspec() (it | |
5419 | requires the args preceded by *). So I removed all the code from |
|
5425 | requires the args preceded by *). So I removed all the code from | |
5420 | _get_pdef in Magic, which was just replicating that. |
|
5426 | _get_pdef in Magic, which was just replicating that. | |
5421 |
|
5427 | |||
5422 | * Added test to prefilter to allow redefining magic function names |
|
5428 | * Added test to prefilter to allow redefining magic function names | |
5423 | as variables. This is ok, since the @ form is always available, |
|
5429 | as variables. This is ok, since the @ form is always available, | |
5424 | but whe should allow the user to define a variable called 'ls' if |
|
5430 | but whe should allow the user to define a variable called 'ls' if | |
5425 | he needs it. |
|
5431 | he needs it. | |
5426 |
|
5432 | |||
5427 | * Moved the ToDo information from README into a separate ToDo. |
|
5433 | * Moved the ToDo information from README into a separate ToDo. | |
5428 |
|
5434 | |||
5429 | * General code cleanup and small bugfixes. I think it's close to a |
|
5435 | * General code cleanup and small bugfixes. I think it's close to a | |
5430 | state where it can be released, obviously with a big 'beta' |
|
5436 | state where it can be released, obviously with a big 'beta' | |
5431 | warning on it. |
|
5437 | warning on it. | |
5432 |
|
5438 | |||
5433 | * Got the magic function split to work. Now all magics are defined |
|
5439 | * Got the magic function split to work. Now all magics are defined | |
5434 | in a separate class. It just organizes things a bit, and now |
|
5440 | in a separate class. It just organizes things a bit, and now | |
5435 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it |
|
5441 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it | |
5436 | was too long). |
|
5442 | was too long). | |
5437 |
|
5443 | |||
5438 | * Changed @clear to @reset to avoid potential confusions with |
|
5444 | * Changed @clear to @reset to avoid potential confusions with | |
5439 | the shell command clear. Also renamed @cl to @clear, which does |
|
5445 | the shell command clear. Also renamed @cl to @clear, which does | |
5440 | exactly what people expect it to from their shell experience. |
|
5446 | exactly what people expect it to from their shell experience. | |
5441 |
|
5447 | |||
5442 | Added a check to the @reset command (since it's so |
|
5448 | Added a check to the @reset command (since it's so | |
5443 | destructive, it's probably a good idea to ask for confirmation). |
|
5449 | destructive, it's probably a good idea to ask for confirmation). | |
5444 | But now reset only works for full namespace resetting. Since the |
|
5450 | But now reset only works for full namespace resetting. Since the | |
5445 | del keyword is already there for deleting a few specific |
|
5451 | del keyword is already there for deleting a few specific | |
5446 | variables, I don't see the point of having a redundant magic |
|
5452 | variables, I don't see the point of having a redundant magic | |
5447 | function for the same task. |
|
5453 | function for the same task. | |
5448 |
|
5454 | |||
5449 | 2001-11-24 Fernando Perez <fperez@colorado.edu> |
|
5455 | 2001-11-24 Fernando Perez <fperez@colorado.edu> | |
5450 |
|
5456 | |||
5451 | * Updated the builtin docs (esp. the ? ones). |
|
5457 | * Updated the builtin docs (esp. the ? ones). | |
5452 |
|
5458 | |||
5453 | * Ran all the code through pychecker. Not terribly impressed with |
|
5459 | * Ran all the code through pychecker. Not terribly impressed with | |
5454 | it: lots of spurious warnings and didn't really find anything of |
|
5460 | it: lots of spurious warnings and didn't really find anything of | |
5455 | substance (just a few modules being imported and not used). |
|
5461 | substance (just a few modules being imported and not used). | |
5456 |
|
5462 | |||
5457 | * Implemented the new ultraTB functionality into IPython. New |
|
5463 | * Implemented the new ultraTB functionality into IPython. New | |
5458 | option: xcolors. This chooses color scheme. xmode now only selects |
|
5464 | option: xcolors. This chooses color scheme. xmode now only selects | |
5459 | between Plain and Verbose. Better orthogonality. |
|
5465 | between Plain and Verbose. Better orthogonality. | |
5460 |
|
5466 | |||
5461 | * Large rewrite of ultraTB. Much cleaner now, with a separation of |
|
5467 | * Large rewrite of ultraTB. Much cleaner now, with a separation of | |
5462 | mode and color scheme for the exception handlers. Now it's |
|
5468 | mode and color scheme for the exception handlers. Now it's | |
5463 | possible to have the verbose traceback with no coloring. |
|
5469 | possible to have the verbose traceback with no coloring. | |
5464 |
|
5470 | |||
5465 | 2001-11-23 Fernando Perez <fperez@colorado.edu> |
|
5471 | 2001-11-23 Fernando Perez <fperez@colorado.edu> | |
5466 |
|
5472 | |||
5467 | * Version 0.1.12 released, 0.1.13 opened. |
|
5473 | * Version 0.1.12 released, 0.1.13 opened. | |
5468 |
|
5474 | |||
5469 | * Removed option to set auto-quote and auto-paren escapes by |
|
5475 | * Removed option to set auto-quote and auto-paren escapes by | |
5470 | user. The chances of breaking valid syntax are just too high. If |
|
5476 | user. The chances of breaking valid syntax are just too high. If | |
5471 | someone *really* wants, they can always dig into the code. |
|
5477 | someone *really* wants, they can always dig into the code. | |
5472 |
|
5478 | |||
5473 | * Made prompt separators configurable. |
|
5479 | * Made prompt separators configurable. | |
5474 |
|
5480 | |||
5475 | 2001-11-22 Fernando Perez <fperez@colorado.edu> |
|
5481 | 2001-11-22 Fernando Perez <fperez@colorado.edu> | |
5476 |
|
5482 | |||
5477 | * Small bugfixes in many places. |
|
5483 | * Small bugfixes in many places. | |
5478 |
|
5484 | |||
5479 | * Removed the MyCompleter class from ipplib. It seemed redundant |
|
5485 | * Removed the MyCompleter class from ipplib. It seemed redundant | |
5480 | with the C-p,C-n history search functionality. Less code to |
|
5486 | with the C-p,C-n history search functionality. Less code to | |
5481 | maintain. |
|
5487 | maintain. | |
5482 |
|
5488 | |||
5483 | * Moved all the original ipython.py code into ipythonlib.py. Right |
|
5489 | * Moved all the original ipython.py code into ipythonlib.py. Right | |
5484 | now it's just one big dump into a function called make_IPython, so |
|
5490 | now it's just one big dump into a function called make_IPython, so | |
5485 | no real modularity has been gained. But at least it makes the |
|
5491 | no real modularity has been gained. But at least it makes the | |
5486 | wrapper script tiny, and since ipythonlib is a module, it gets |
|
5492 | wrapper script tiny, and since ipythonlib is a module, it gets | |
5487 | compiled and startup is much faster. |
|
5493 | compiled and startup is much faster. | |
5488 |
|
5494 | |||
5489 | This is a reasobably 'deep' change, so we should test it for a |
|
5495 | This is a reasobably 'deep' change, so we should test it for a | |
5490 | while without messing too much more with the code. |
|
5496 | while without messing too much more with the code. | |
5491 |
|
5497 | |||
5492 | 2001-11-21 Fernando Perez <fperez@colorado.edu> |
|
5498 | 2001-11-21 Fernando Perez <fperez@colorado.edu> | |
5493 |
|
5499 | |||
5494 | * Version 0.1.11 released, 0.1.12 opened for further work. |
|
5500 | * Version 0.1.11 released, 0.1.12 opened for further work. | |
5495 |
|
5501 | |||
5496 | * Removed dependency on Itpl. It was only needed in one place. It |
|
5502 | * Removed dependency on Itpl. It was only needed in one place. It | |
5497 | would be nice if this became part of python, though. It makes life |
|
5503 | would be nice if this became part of python, though. It makes life | |
5498 | *a lot* easier in some cases. |
|
5504 | *a lot* easier in some cases. | |
5499 |
|
5505 | |||
5500 | * Simplified the prefilter code a bit. Now all handlers are |
|
5506 | * Simplified the prefilter code a bit. Now all handlers are | |
5501 | expected to explicitly return a value (at least a blank string). |
|
5507 | expected to explicitly return a value (at least a blank string). | |
5502 |
|
5508 | |||
5503 | * Heavy edits in ipplib. Removed the help system altogether. Now |
|
5509 | * Heavy edits in ipplib. Removed the help system altogether. Now | |
5504 | obj?/?? is used for inspecting objects, a magic @doc prints |
|
5510 | obj?/?? is used for inspecting objects, a magic @doc prints | |
5505 | docstrings, and full-blown Python help is accessed via the 'help' |
|
5511 | docstrings, and full-blown Python help is accessed via the 'help' | |
5506 | keyword. This cleans up a lot of code (less to maintain) and does |
|
5512 | keyword. This cleans up a lot of code (less to maintain) and does | |
5507 | the job. Since 'help' is now a standard Python component, might as |
|
5513 | the job. Since 'help' is now a standard Python component, might as | |
5508 | well use it and remove duplicate functionality. |
|
5514 | well use it and remove duplicate functionality. | |
5509 |
|
5515 | |||
5510 | Also removed the option to use ipplib as a standalone program. By |
|
5516 | Also removed the option to use ipplib as a standalone program. By | |
5511 | now it's too dependent on other parts of IPython to function alone. |
|
5517 | now it's too dependent on other parts of IPython to function alone. | |
5512 |
|
5518 | |||
5513 | * Fixed bug in genutils.pager. It would crash if the pager was |
|
5519 | * Fixed bug in genutils.pager. It would crash if the pager was | |
5514 | exited immediately after opening (broken pipe). |
|
5520 | exited immediately after opening (broken pipe). | |
5515 |
|
5521 | |||
5516 | * Trimmed down the VerboseTB reporting a little. The header is |
|
5522 | * Trimmed down the VerboseTB reporting a little. The header is | |
5517 | much shorter now and the repeated exception arguments at the end |
|
5523 | much shorter now and the repeated exception arguments at the end | |
5518 | have been removed. For interactive use the old header seemed a bit |
|
5524 | have been removed. For interactive use the old header seemed a bit | |
5519 | excessive. |
|
5525 | excessive. | |
5520 |
|
5526 | |||
5521 | * Fixed small bug in output of @whos for variables with multi-word |
|
5527 | * Fixed small bug in output of @whos for variables with multi-word | |
5522 | types (only first word was displayed). |
|
5528 | types (only first word was displayed). | |
5523 |
|
5529 | |||
5524 | 2001-11-17 Fernando Perez <fperez@colorado.edu> |
|
5530 | 2001-11-17 Fernando Perez <fperez@colorado.edu> | |
5525 |
|
5531 | |||
5526 | * Version 0.1.10 released, 0.1.11 opened for further work. |
|
5532 | * Version 0.1.10 released, 0.1.11 opened for further work. | |
5527 |
|
5533 | |||
5528 | * Modified dirs and friends. dirs now *returns* the stack (not |
|
5534 | * Modified dirs and friends. dirs now *returns* the stack (not | |
5529 | prints), so one can manipulate it as a variable. Convenient to |
|
5535 | prints), so one can manipulate it as a variable. Convenient to | |
5530 | travel along many directories. |
|
5536 | travel along many directories. | |
5531 |
|
5537 | |||
5532 | * Fixed bug in magic_pdef: would only work with functions with |
|
5538 | * Fixed bug in magic_pdef: would only work with functions with | |
5533 | arguments with default values. |
|
5539 | arguments with default values. | |
5534 |
|
5540 | |||
5535 | 2001-11-14 Fernando Perez <fperez@colorado.edu> |
|
5541 | 2001-11-14 Fernando Perez <fperez@colorado.edu> | |
5536 |
|
5542 | |||
5537 | * Added the PhysicsInput stuff to dot_ipython so it ships as an |
|
5543 | * Added the PhysicsInput stuff to dot_ipython so it ships as an | |
5538 | example with IPython. Various other minor fixes and cleanups. |
|
5544 | example with IPython. Various other minor fixes and cleanups. | |
5539 |
|
5545 | |||
5540 | * Version 0.1.9 released, 0.1.10 opened for further work. |
|
5546 | * Version 0.1.9 released, 0.1.10 opened for further work. | |
5541 |
|
5547 | |||
5542 | * Added sys.path to the list of directories searched in the |
|
5548 | * Added sys.path to the list of directories searched in the | |
5543 | execfile= option. It used to be the current directory and the |
|
5549 | execfile= option. It used to be the current directory and the | |
5544 | user's IPYTHONDIR only. |
|
5550 | user's IPYTHONDIR only. | |
5545 |
|
5551 | |||
5546 | 2001-11-13 Fernando Perez <fperez@colorado.edu> |
|
5552 | 2001-11-13 Fernando Perez <fperez@colorado.edu> | |
5547 |
|
5553 | |||
5548 | * Reinstated the raw_input/prefilter separation that Janko had |
|
5554 | * Reinstated the raw_input/prefilter separation that Janko had | |
5549 | initially. This gives a more convenient setup for extending the |
|
5555 | initially. This gives a more convenient setup for extending the | |
5550 | pre-processor from the outside: raw_input always gets a string, |
|
5556 | pre-processor from the outside: raw_input always gets a string, | |
5551 | and prefilter has to process it. We can then redefine prefilter |
|
5557 | and prefilter has to process it. We can then redefine prefilter | |
5552 | from the outside and implement extensions for special |
|
5558 | from the outside and implement extensions for special | |
5553 | purposes. |
|
5559 | purposes. | |
5554 |
|
5560 | |||
5555 | Today I got one for inputting PhysicalQuantity objects |
|
5561 | Today I got one for inputting PhysicalQuantity objects | |
5556 | (from Scientific) without needing any function calls at |
|
5562 | (from Scientific) without needing any function calls at | |
5557 | all. Extremely convenient, and it's all done as a user-level |
|
5563 | all. Extremely convenient, and it's all done as a user-level | |
5558 | extension (no IPython code was touched). Now instead of: |
|
5564 | extension (no IPython code was touched). Now instead of: | |
5559 | a = PhysicalQuantity(4.2,'m/s**2') |
|
5565 | a = PhysicalQuantity(4.2,'m/s**2') | |
5560 | one can simply say |
|
5566 | one can simply say | |
5561 | a = 4.2 m/s**2 |
|
5567 | a = 4.2 m/s**2 | |
5562 | or even |
|
5568 | or even | |
5563 | a = 4.2 m/s^2 |
|
5569 | a = 4.2 m/s^2 | |
5564 |
|
5570 | |||
5565 | I use this, but it's also a proof of concept: IPython really is |
|
5571 | I use this, but it's also a proof of concept: IPython really is | |
5566 | fully user-extensible, even at the level of the parsing of the |
|
5572 | fully user-extensible, even at the level of the parsing of the | |
5567 | command line. It's not trivial, but it's perfectly doable. |
|
5573 | command line. It's not trivial, but it's perfectly doable. | |
5568 |
|
5574 | |||
5569 | * Added 'add_flip' method to inclusion conflict resolver. Fixes |
|
5575 | * Added 'add_flip' method to inclusion conflict resolver. Fixes | |
5570 | the problem of modules being loaded in the inverse order in which |
|
5576 | the problem of modules being loaded in the inverse order in which | |
5571 | they were defined in |
|
5577 | they were defined in | |
5572 |
|
5578 | |||
5573 | * Version 0.1.8 released, 0.1.9 opened for further work. |
|
5579 | * Version 0.1.8 released, 0.1.9 opened for further work. | |
5574 |
|
5580 | |||
5575 | * Added magics pdef, source and file. They respectively show the |
|
5581 | * Added magics pdef, source and file. They respectively show the | |
5576 | definition line ('prototype' in C), source code and full python |
|
5582 | definition line ('prototype' in C), source code and full python | |
5577 | file for any callable object. The object inspector oinfo uses |
|
5583 | file for any callable object. The object inspector oinfo uses | |
5578 | these to show the same information. |
|
5584 | these to show the same information. | |
5579 |
|
5585 | |||
5580 | * Version 0.1.7 released, 0.1.8 opened for further work. |
|
5586 | * Version 0.1.7 released, 0.1.8 opened for further work. | |
5581 |
|
5587 | |||
5582 | * Separated all the magic functions into a class called Magic. The |
|
5588 | * Separated all the magic functions into a class called Magic. The | |
5583 | InteractiveShell class was becoming too big for Xemacs to handle |
|
5589 | InteractiveShell class was becoming too big for Xemacs to handle | |
5584 | (de-indenting a line would lock it up for 10 seconds while it |
|
5590 | (de-indenting a line would lock it up for 10 seconds while it | |
5585 | backtracked on the whole class!) |
|
5591 | backtracked on the whole class!) | |
5586 |
|
5592 | |||
5587 | FIXME: didn't work. It can be done, but right now namespaces are |
|
5593 | FIXME: didn't work. It can be done, but right now namespaces are | |
5588 | all messed up. Do it later (reverted it for now, so at least |
|
5594 | all messed up. Do it later (reverted it for now, so at least | |
5589 | everything works as before). |
|
5595 | everything works as before). | |
5590 |
|
5596 | |||
5591 | * Got the object introspection system (magic_oinfo) working! I |
|
5597 | * Got the object introspection system (magic_oinfo) working! I | |
5592 | think this is pretty much ready for release to Janko, so he can |
|
5598 | think this is pretty much ready for release to Janko, so he can | |
5593 | test it for a while and then announce it. Pretty much 100% of what |
|
5599 | test it for a while and then announce it. Pretty much 100% of what | |
5594 | I wanted for the 'phase 1' release is ready. Happy, tired. |
|
5600 | I wanted for the 'phase 1' release is ready. Happy, tired. | |
5595 |
|
5601 | |||
5596 | 2001-11-12 Fernando Perez <fperez@colorado.edu> |
|
5602 | 2001-11-12 Fernando Perez <fperez@colorado.edu> | |
5597 |
|
5603 | |||
5598 | * Version 0.1.6 released, 0.1.7 opened for further work. |
|
5604 | * Version 0.1.6 released, 0.1.7 opened for further work. | |
5599 |
|
5605 | |||
5600 | * Fixed bug in printing: it used to test for truth before |
|
5606 | * Fixed bug in printing: it used to test for truth before | |
5601 | printing, so 0 wouldn't print. Now checks for None. |
|
5607 | printing, so 0 wouldn't print. Now checks for None. | |
5602 |
|
5608 | |||
5603 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c |
|
5609 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c | |
5604 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it |
|
5610 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it | |
5605 | reaches by hand into the outputcache. Think of a better way to do |
|
5611 | reaches by hand into the outputcache. Think of a better way to do | |
5606 | this later. |
|
5612 | this later. | |
5607 |
|
5613 | |||
5608 | * Various small fixes thanks to Nathan's comments. |
|
5614 | * Various small fixes thanks to Nathan's comments. | |
5609 |
|
5615 | |||
5610 | * Changed magic_pprint to magic_Pprint. This way it doesn't |
|
5616 | * Changed magic_pprint to magic_Pprint. This way it doesn't | |
5611 | collide with pprint() and the name is consistent with the command |
|
5617 | collide with pprint() and the name is consistent with the command | |
5612 | line option. |
|
5618 | line option. | |
5613 |
|
5619 | |||
5614 | * Changed prompt counter behavior to be fully like |
|
5620 | * Changed prompt counter behavior to be fully like | |
5615 | Mathematica's. That is, even input that doesn't return a result |
|
5621 | Mathematica's. That is, even input that doesn't return a result | |
5616 | raises the prompt counter. The old behavior was kind of confusing |
|
5622 | raises the prompt counter. The old behavior was kind of confusing | |
5617 | (getting the same prompt number several times if the operation |
|
5623 | (getting the same prompt number several times if the operation | |
5618 | didn't return a result). |
|
5624 | didn't return a result). | |
5619 |
|
5625 | |||
5620 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). |
|
5626 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). | |
5621 |
|
5627 | |||
5622 | * Fixed -Classic mode (wasn't working anymore). |
|
5628 | * Fixed -Classic mode (wasn't working anymore). | |
5623 |
|
5629 | |||
5624 | * Added colored prompts using Nathan's new code. Colors are |
|
5630 | * Added colored prompts using Nathan's new code. Colors are | |
5625 | currently hardwired, they can be user-configurable. For |
|
5631 | currently hardwired, they can be user-configurable. For | |
5626 | developers, they can be chosen in file ipythonlib.py, at the |
|
5632 | developers, they can be chosen in file ipythonlib.py, at the | |
5627 | beginning of the CachedOutput class def. |
|
5633 | beginning of the CachedOutput class def. | |
5628 |
|
5634 | |||
5629 | 2001-11-11 Fernando Perez <fperez@colorado.edu> |
|
5635 | 2001-11-11 Fernando Perez <fperez@colorado.edu> | |
5630 |
|
5636 | |||
5631 | * Version 0.1.5 released, 0.1.6 opened for further work. |
|
5637 | * Version 0.1.5 released, 0.1.6 opened for further work. | |
5632 |
|
5638 | |||
5633 | * Changed magic_env to *return* the environment as a dict (not to |
|
5639 | * Changed magic_env to *return* the environment as a dict (not to | |
5634 | print it). This way it prints, but it can also be processed. |
|
5640 | print it). This way it prints, but it can also be processed. | |
5635 |
|
5641 | |||
5636 | * Added Verbose exception reporting to interactive |
|
5642 | * Added Verbose exception reporting to interactive | |
5637 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose |
|
5643 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose | |
5638 | traceback. Had to make some changes to the ultraTB file. This is |
|
5644 | traceback. Had to make some changes to the ultraTB file. This is | |
5639 | probably the last 'big' thing in my mental todo list. This ties |
|
5645 | probably the last 'big' thing in my mental todo list. This ties | |
5640 | in with the next entry: |
|
5646 | in with the next entry: | |
5641 |
|
5647 | |||
5642 | * Changed -Xi and -Xf to a single -xmode option. Now all the user |
|
5648 | * Changed -Xi and -Xf to a single -xmode option. Now all the user | |
5643 | has to specify is Plain, Color or Verbose for all exception |
|
5649 | has to specify is Plain, Color or Verbose for all exception | |
5644 | handling. |
|
5650 | handling. | |
5645 |
|
5651 | |||
5646 | * Removed ShellServices option. All this can really be done via |
|
5652 | * Removed ShellServices option. All this can really be done via | |
5647 | the magic system. It's easier to extend, cleaner and has automatic |
|
5653 | the magic system. It's easier to extend, cleaner and has automatic | |
5648 | namespace protection and documentation. |
|
5654 | namespace protection and documentation. | |
5649 |
|
5655 | |||
5650 | 2001-11-09 Fernando Perez <fperez@colorado.edu> |
|
5656 | 2001-11-09 Fernando Perez <fperez@colorado.edu> | |
5651 |
|
5657 | |||
5652 | * Fixed bug in output cache flushing (missing parameter to |
|
5658 | * Fixed bug in output cache flushing (missing parameter to | |
5653 | __init__). Other small bugs fixed (found using pychecker). |
|
5659 | __init__). Other small bugs fixed (found using pychecker). | |
5654 |
|
5660 | |||
5655 | * Version 0.1.4 opened for bugfixing. |
|
5661 | * Version 0.1.4 opened for bugfixing. | |
5656 |
|
5662 | |||
5657 | 2001-11-07 Fernando Perez <fperez@colorado.edu> |
|
5663 | 2001-11-07 Fernando Perez <fperez@colorado.edu> | |
5658 |
|
5664 | |||
5659 | * Version 0.1.3 released, mainly because of the raw_input bug. |
|
5665 | * Version 0.1.3 released, mainly because of the raw_input bug. | |
5660 |
|
5666 | |||
5661 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed |
|
5667 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed | |
5662 | and when testing for whether things were callable, a call could |
|
5668 | and when testing for whether things were callable, a call could | |
5663 | actually be made to certain functions. They would get called again |
|
5669 | actually be made to certain functions. They would get called again | |
5664 | once 'really' executed, with a resulting double call. A disaster |
|
5670 | once 'really' executed, with a resulting double call. A disaster | |
5665 | in many cases (list.reverse() would never work!). |
|
5671 | in many cases (list.reverse() would never work!). | |
5666 |
|
5672 | |||
5667 | * Removed prefilter() function, moved its code to raw_input (which |
|
5673 | * Removed prefilter() function, moved its code to raw_input (which | |
5668 | after all was just a near-empty caller for prefilter). This saves |
|
5674 | after all was just a near-empty caller for prefilter). This saves | |
5669 | a function call on every prompt, and simplifies the class a tiny bit. |
|
5675 | a function call on every prompt, and simplifies the class a tiny bit. | |
5670 |
|
5676 | |||
5671 | * Fix _ip to __ip name in magic example file. |
|
5677 | * Fix _ip to __ip name in magic example file. | |
5672 |
|
5678 | |||
5673 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should |
|
5679 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should | |
5674 | work with non-gnu versions of tar. |
|
5680 | work with non-gnu versions of tar. | |
5675 |
|
5681 | |||
5676 | 2001-11-06 Fernando Perez <fperez@colorado.edu> |
|
5682 | 2001-11-06 Fernando Perez <fperez@colorado.edu> | |
5677 |
|
5683 | |||
5678 | * Version 0.1.2. Just to keep track of the recent changes. |
|
5684 | * Version 0.1.2. Just to keep track of the recent changes. | |
5679 |
|
5685 | |||
5680 | * Fixed nasty bug in output prompt routine. It used to check 'if |
|
5686 | * Fixed nasty bug in output prompt routine. It used to check 'if | |
5681 | arg != None...'. Problem is, this fails if arg implements a |
|
5687 | arg != None...'. Problem is, this fails if arg implements a | |
5682 | special comparison (__cmp__) which disallows comparing to |
|
5688 | special comparison (__cmp__) which disallows comparing to | |
5683 | None. Found it when trying to use the PhysicalQuantity module from |
|
5689 | None. Found it when trying to use the PhysicalQuantity module from | |
5684 | ScientificPython. |
|
5690 | ScientificPython. | |
5685 |
|
5691 | |||
5686 | 2001-11-05 Fernando Perez <fperez@colorado.edu> |
|
5692 | 2001-11-05 Fernando Perez <fperez@colorado.edu> | |
5687 |
|
5693 | |||
5688 | * Also added dirs. Now the pushd/popd/dirs family functions |
|
5694 | * Also added dirs. Now the pushd/popd/dirs family functions | |
5689 | basically like the shell, with the added convenience of going home |
|
5695 | basically like the shell, with the added convenience of going home | |
5690 | when called with no args. |
|
5696 | when called with no args. | |
5691 |
|
5697 | |||
5692 | * pushd/popd slightly modified to mimic shell behavior more |
|
5698 | * pushd/popd slightly modified to mimic shell behavior more | |
5693 | closely. |
|
5699 | closely. | |
5694 |
|
5700 | |||
5695 | * Added env,pushd,popd from ShellServices as magic functions. I |
|
5701 | * Added env,pushd,popd from ShellServices as magic functions. I | |
5696 | think the cleanest will be to port all desired functions from |
|
5702 | think the cleanest will be to port all desired functions from | |
5697 | ShellServices as magics and remove ShellServices altogether. This |
|
5703 | ShellServices as magics and remove ShellServices altogether. This | |
5698 | will provide a single, clean way of adding functionality |
|
5704 | will provide a single, clean way of adding functionality | |
5699 | (shell-type or otherwise) to IP. |
|
5705 | (shell-type or otherwise) to IP. | |
5700 |
|
5706 | |||
5701 | 2001-11-04 Fernando Perez <fperez@colorado.edu> |
|
5707 | 2001-11-04 Fernando Perez <fperez@colorado.edu> | |
5702 |
|
5708 | |||
5703 | * Added .ipython/ directory to sys.path. This way users can keep |
|
5709 | * Added .ipython/ directory to sys.path. This way users can keep | |
5704 | customizations there and access them via import. |
|
5710 | customizations there and access them via import. | |
5705 |
|
5711 | |||
5706 | 2001-11-03 Fernando Perez <fperez@colorado.edu> |
|
5712 | 2001-11-03 Fernando Perez <fperez@colorado.edu> | |
5707 |
|
5713 | |||
5708 | * Opened version 0.1.1 for new changes. |
|
5714 | * Opened version 0.1.1 for new changes. | |
5709 |
|
5715 | |||
5710 | * Changed version number to 0.1.0: first 'public' release, sent to |
|
5716 | * Changed version number to 0.1.0: first 'public' release, sent to | |
5711 | Nathan and Janko. |
|
5717 | Nathan and Janko. | |
5712 |
|
5718 | |||
5713 | * Lots of small fixes and tweaks. |
|
5719 | * Lots of small fixes and tweaks. | |
5714 |
|
5720 | |||
5715 | * Minor changes to whos format. Now strings are shown, snipped if |
|
5721 | * Minor changes to whos format. Now strings are shown, snipped if | |
5716 | too long. |
|
5722 | too long. | |
5717 |
|
5723 | |||
5718 | * Changed ShellServices to work on __main__ so they show up in @who |
|
5724 | * Changed ShellServices to work on __main__ so they show up in @who | |
5719 |
|
5725 | |||
5720 | * Help also works with ? at the end of a line: |
|
5726 | * Help also works with ? at the end of a line: | |
5721 | ?sin and sin? |
|
5727 | ?sin and sin? | |
5722 | both produce the same effect. This is nice, as often I use the |
|
5728 | both produce the same effect. This is nice, as often I use the | |
5723 | tab-complete to find the name of a method, but I used to then have |
|
5729 | tab-complete to find the name of a method, but I used to then have | |
5724 | to go to the beginning of the line to put a ? if I wanted more |
|
5730 | to go to the beginning of the line to put a ? if I wanted more | |
5725 | info. Now I can just add the ? and hit return. Convenient. |
|
5731 | info. Now I can just add the ? and hit return. Convenient. | |
5726 |
|
5732 | |||
5727 | 2001-11-02 Fernando Perez <fperez@colorado.edu> |
|
5733 | 2001-11-02 Fernando Perez <fperez@colorado.edu> | |
5728 |
|
5734 | |||
5729 | * Python version check (>=2.1) added. |
|
5735 | * Python version check (>=2.1) added. | |
5730 |
|
5736 | |||
5731 | * Added LazyPython documentation. At this point the docs are quite |
|
5737 | * Added LazyPython documentation. At this point the docs are quite | |
5732 | a mess. A cleanup is in order. |
|
5738 | a mess. A cleanup is in order. | |
5733 |
|
5739 | |||
5734 | * Auto-installer created. For some bizarre reason, the zipfiles |
|
5740 | * Auto-installer created. For some bizarre reason, the zipfiles | |
5735 | module isn't working on my system. So I made a tar version |
|
5741 | module isn't working on my system. So I made a tar version | |
5736 | (hopefully the command line options in various systems won't kill |
|
5742 | (hopefully the command line options in various systems won't kill | |
5737 | me). |
|
5743 | me). | |
5738 |
|
5744 | |||
5739 | * Fixes to Struct in genutils. Now all dictionary-like methods are |
|
5745 | * Fixes to Struct in genutils. Now all dictionary-like methods are | |
5740 | protected (reasonably). |
|
5746 | protected (reasonably). | |
5741 |
|
5747 | |||
5742 | * Added pager function to genutils and changed ? to print usage |
|
5748 | * Added pager function to genutils and changed ? to print usage | |
5743 | note through it (it was too long). |
|
5749 | note through it (it was too long). | |
5744 |
|
5750 | |||
5745 | * Added the LazyPython functionality. Works great! I changed the |
|
5751 | * Added the LazyPython functionality. Works great! I changed the | |
5746 | auto-quote escape to ';', it's on home row and next to '. But |
|
5752 | auto-quote escape to ';', it's on home row and next to '. But | |
5747 | both auto-quote and auto-paren (still /) escapes are command-line |
|
5753 | both auto-quote and auto-paren (still /) escapes are command-line | |
5748 | parameters. |
|
5754 | parameters. | |
5749 |
|
5755 | |||
5750 |
|
5756 | |||
5751 | 2001-11-01 Fernando Perez <fperez@colorado.edu> |
|
5757 | 2001-11-01 Fernando Perez <fperez@colorado.edu> | |
5752 |
|
5758 | |||
5753 | * Version changed to 0.0.7. Fairly large change: configuration now |
|
5759 | * Version changed to 0.0.7. Fairly large change: configuration now | |
5754 | is all stored in a directory, by default .ipython. There, all |
|
5760 | is all stored in a directory, by default .ipython. There, all | |
5755 | config files have normal looking names (not .names) |
|
5761 | config files have normal looking names (not .names) | |
5756 |
|
5762 | |||
5757 | * Version 0.0.6 Released first to Lucas and Archie as a test |
|
5763 | * Version 0.0.6 Released first to Lucas and Archie as a test | |
5758 | run. Since it's the first 'semi-public' release, change version to |
|
5764 | run. Since it's the first 'semi-public' release, change version to | |
5759 | > 0.0.6 for any changes now. |
|
5765 | > 0.0.6 for any changes now. | |
5760 |
|
5766 | |||
5761 | * Stuff I had put in the ipplib.py changelog: |
|
5767 | * Stuff I had put in the ipplib.py changelog: | |
5762 |
|
5768 | |||
5763 | Changes to InteractiveShell: |
|
5769 | Changes to InteractiveShell: | |
5764 |
|
5770 | |||
5765 | - Made the usage message a parameter. |
|
5771 | - Made the usage message a parameter. | |
5766 |
|
5772 | |||
5767 | - Require the name of the shell variable to be given. It's a bit |
|
5773 | - Require the name of the shell variable to be given. It's a bit | |
5768 | of a hack, but allows the name 'shell' not to be hardwired in the |
|
5774 | of a hack, but allows the name 'shell' not to be hardwired in the | |
5769 | magic (@) handler, which is problematic b/c it requires |
|
5775 | magic (@) handler, which is problematic b/c it requires | |
5770 | polluting the global namespace with 'shell'. This in turn is |
|
5776 | polluting the global namespace with 'shell'. This in turn is | |
5771 | fragile: if a user redefines a variable called shell, things |
|
5777 | fragile: if a user redefines a variable called shell, things | |
5772 | break. |
|
5778 | break. | |
5773 |
|
5779 | |||
5774 | - magic @: all functions available through @ need to be defined |
|
5780 | - magic @: all functions available through @ need to be defined | |
5775 | as magic_<name>, even though they can be called simply as |
|
5781 | as magic_<name>, even though they can be called simply as | |
5776 | @<name>. This allows the special command @magic to gather |
|
5782 | @<name>. This allows the special command @magic to gather | |
5777 | information automatically about all existing magic functions, |
|
5783 | information automatically about all existing magic functions, | |
5778 | even if they are run-time user extensions, by parsing the shell |
|
5784 | even if they are run-time user extensions, by parsing the shell | |
5779 | instance __dict__ looking for special magic_ names. |
|
5785 | instance __dict__ looking for special magic_ names. | |
5780 |
|
5786 | |||
5781 | - mainloop: added *two* local namespace parameters. This allows |
|
5787 | - mainloop: added *two* local namespace parameters. This allows | |
5782 | the class to differentiate between parameters which were there |
|
5788 | the class to differentiate between parameters which were there | |
5783 | before and after command line initialization was processed. This |
|
5789 | before and after command line initialization was processed. This | |
5784 | way, later @who can show things loaded at startup by the |
|
5790 | way, later @who can show things loaded at startup by the | |
5785 | user. This trick was necessary to make session saving/reloading |
|
5791 | user. This trick was necessary to make session saving/reloading | |
5786 | really work: ideally after saving/exiting/reloading a session, |
|
5792 | really work: ideally after saving/exiting/reloading a session, | |
5787 | *everything* should look the same, including the output of @who. I |
|
5793 | *everything* should look the same, including the output of @who. I | |
5788 | was only able to make this work with this double namespace |
|
5794 | was only able to make this work with this double namespace | |
5789 | trick. |
|
5795 | trick. | |
5790 |
|
5796 | |||
5791 | - added a header to the logfile which allows (almost) full |
|
5797 | - added a header to the logfile which allows (almost) full | |
5792 | session restoring. |
|
5798 | session restoring. | |
5793 |
|
5799 | |||
5794 | - prepend lines beginning with @ or !, with a and log |
|
5800 | - prepend lines beginning with @ or !, with a and log | |
5795 | them. Why? !lines: may be useful to know what you did @lines: |
|
5801 | them. Why? !lines: may be useful to know what you did @lines: | |
5796 | they may affect session state. So when restoring a session, at |
|
5802 | they may affect session state. So when restoring a session, at | |
5797 | least inform the user of their presence. I couldn't quite get |
|
5803 | least inform the user of their presence. I couldn't quite get | |
5798 | them to properly re-execute, but at least the user is warned. |
|
5804 | them to properly re-execute, but at least the user is warned. | |
5799 |
|
5805 | |||
5800 | * Started ChangeLog. |
|
5806 | * Started ChangeLog. |
General Comments 0
You need to be logged in to leave comments.
Login now