##// END OF EJS Templates
david cournapeau patch from ticket \#107 (import_some fix). doc changes
vivainio -
Show More
@@ -1,34 +1,36 b''
1 """ User configuration file for IPython
1 """ User configuration file for IPython
2
2
3 This is a more flexible and safe way to configure ipython than *rc files
3 This is a more flexible and safe way to configure ipython than *rc files
4 (ipythonrc, ipythonrc-pysh etc.)
4 (ipythonrc, ipythonrc-pysh etc.)
5
5
6 This file is always imported on ipython startup. You can import the
6 This file is always imported on ipython startup. You can import the
7 ipython extensions you need here (see IPython/Extensions directory).
7 ipython extensions you need here (see IPython/Extensions directory).
8
8
9 Feel free to edit this file to customize your ipython experience.
9 Feel free to edit this file to customize your ipython experience.
10
10
11 Note that as such this file does nothing, for backwards compatibility.
11 Note that as such this file does nothing, for backwards compatibility.
12 Consult e.g. file 'ipy_profile_sh.py' for an example of the things
12 Consult e.g. file 'ipy_profile_sh.py' for an example of the things
13 you can do here.
13 you can do here.
14
14
15 See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed
16 description on what you could do here.
15 """
17 """
16
18
17 # Most of your config files and extensions will probably start with this import
19 # Most of your config files and extensions will probably start with this import
18
20
19 import IPython.ipapi
21 import IPython.ipapi
20 ip = IPython.ipapi.get()
22 ip = IPython.ipapi.get()
21
23
22 # You probably want to uncomment this if you did %upgrade -nolegacy
24 # You probably want to uncomment this if you did %upgrade -nolegacy
23 # import ipy_defaults
25 # import ipy_defaults
24
26
25 def main():
27 def main():
26 # Handy tab-completers for %cd, %run, import etc.
28 # Handy tab-completers for %cd, %run, import etc.
27 # Try commenting this out if you have completion problems/slowness
29 # Try commenting this out if you have completion problems/slowness
28 import ipy_stock_completers
30 import ipy_stock_completers
29
31
30 o = ip.options
32 o = ip.options
31 # An example on how to set options
33 # An example on how to set options
32 #o.autocall = 1
34 #o.autocall = 1
33
35
34 main()
36 main()
@@ -1,616 +1,623 b''
1 # -*- Mode: Shell-Script -*- Not really, but shows comments correctly
1 # -*- Mode: Shell-Script -*- Not really, but shows comments correctly
2 # $Id: ipythonrc 1879 2006-11-04 00:34:34Z fptest $
2 # $Id: ipythonrc 1979 2006-12-12 18:50:20Z vivainio $
3
3
4 #***************************************************************************
4 #***************************************************************************
5 #
5 #
6 # Configuration file for IPython -- ipythonrc format
6 # Configuration file for IPython -- ipythonrc format
7 #
7 #
8 # ===========================================================
9 # Deprecation note: you should look into modifying ipy_user_conf.py (located
10 # in ~/.ipython or ~/_ipython, depending on your platform) instead, it's a
11 # more flexible and robust (and better supported!) configuration
12 # method.
13 # ===========================================================
14 #
8 # The format of this file is simply one of 'key value' lines.
15 # The format of this file is simply one of 'key value' lines.
9 # Lines containing only whitespace at the beginning and then a # are ignored
16 # Lines containing only whitespace at the beginning and then a # are ignored
10 # as comments. But comments can NOT be put on lines with data.
17 # as comments. But comments can NOT be put on lines with data.
11
18
12 # The meaning and use of each key are explained below.
19 # The meaning and use of each key are explained below.
13
20
14 #---------------------------------------------------------------------------
21 #---------------------------------------------------------------------------
15 # Section: included files
22 # Section: included files
16
23
17 # Put one or more *config* files (with the syntax of this file) you want to
24 # Put one or more *config* files (with the syntax of this file) you want to
18 # include. For keys with a unique value the outermost file has precedence. For
25 # include. For keys with a unique value the outermost file has precedence. For
19 # keys with multiple values, they all get assembled into a list which then
26 # keys with multiple values, they all get assembled into a list which then
20 # gets loaded by IPython.
27 # gets loaded by IPython.
21
28
22 # In this file, all lists of things should simply be space-separated.
29 # In this file, all lists of things should simply be space-separated.
23
30
24 # This allows you to build hierarchies of files which recursively load
31 # This allows you to build hierarchies of files which recursively load
25 # lower-level services. If this is your main ~/.ipython/ipythonrc file, you
32 # lower-level services. If this is your main ~/.ipython/ipythonrc file, you
26 # should only keep here basic things you always want available. Then you can
33 # should only keep here basic things you always want available. Then you can
27 # include it in every other special-purpose config file you create.
34 # include it in every other special-purpose config file you create.
28 include
35 include
29
36
30 #---------------------------------------------------------------------------
37 #---------------------------------------------------------------------------
31 # Section: startup setup
38 # Section: startup setup
32
39
33 # These are mostly things which parallel a command line option of the same
40 # These are mostly things which parallel a command line option of the same
34 # name.
41 # name.
35
42
36 # Keys in this section should only appear once. If any key from this section
43 # Keys in this section should only appear once. If any key from this section
37 # is encountered more than once, the last value remains, all earlier ones get
44 # is encountered more than once, the last value remains, all earlier ones get
38 # discarded.
45 # discarded.
39
46
40
47
41 # Automatic calling of callable objects. If set to 1 or 2, callable objects
48 # Automatic calling of callable objects. If set to 1 or 2, callable objects
42 # are automatically called when invoked at the command line, even if you don't
49 # are automatically called when invoked at the command line, even if you don't
43 # type parentheses. IPython adds the parentheses for you. For example:
50 # type parentheses. IPython adds the parentheses for you. For example:
44
51
45 #In [1]: str 45
52 #In [1]: str 45
46 #------> str(45)
53 #------> str(45)
47 #Out[1]: '45'
54 #Out[1]: '45'
48
55
49 # IPython reprints your line with '---->' indicating that it added
56 # IPython reprints your line with '---->' indicating that it added
50 # parentheses. While this option is very convenient for interactive use, it
57 # parentheses. While this option is very convenient for interactive use, it
51 # may occasionally cause problems with objects which have side-effects if
58 # may occasionally cause problems with objects which have side-effects if
52 # called unexpectedly.
59 # called unexpectedly.
53
60
54 # The valid values for autocall are:
61 # The valid values for autocall are:
55
62
56 # autocall 0 -> disabled (you can toggle it at runtime with the %autocall magic)
63 # autocall 0 -> disabled (you can toggle it at runtime with the %autocall magic)
57
64
58 # autocall 1 -> active, but do not apply if there are no arguments on the line.
65 # autocall 1 -> active, but do not apply if there are no arguments on the line.
59
66
60 # In this mode, you get:
67 # In this mode, you get:
61
68
62 #In [1]: callable
69 #In [1]: callable
63 #Out[1]: <built-in function callable>
70 #Out[1]: <built-in function callable>
64
71
65 #In [2]: callable 'hello'
72 #In [2]: callable 'hello'
66 #------> callable('hello')
73 #------> callable('hello')
67 #Out[2]: False
74 #Out[2]: False
68
75
69 # 2 -> Active always. Even if no arguments are present, the callable object
76 # 2 -> Active always. Even if no arguments are present, the callable object
70 # is called:
77 # is called:
71
78
72 #In [4]: callable
79 #In [4]: callable
73 #------> callable()
80 #------> callable()
74
81
75 # Note that even with autocall off, you can still use '/' at the start of a
82 # Note that even with autocall off, you can still use '/' at the start of a
76 # line to treat the first argument on the command line as a function and add
83 # line to treat the first argument on the command line as a function and add
77 # parentheses to it:
84 # parentheses to it:
78
85
79 #In [8]: /str 43
86 #In [8]: /str 43
80 #------> str(43)
87 #------> str(43)
81 #Out[8]: '43'
88 #Out[8]: '43'
82
89
83 autocall 1
90 autocall 1
84
91
85 # Auto-edit syntax errors. When you use the %edit magic in ipython to edit
92 # Auto-edit syntax errors. When you use the %edit magic in ipython to edit
86 # source code (see the 'editor' variable below), it is possible that you save
93 # source code (see the 'editor' variable below), it is possible that you save
87 # a file with syntax errors in it. If this variable is true, IPython will ask
94 # a file with syntax errors in it. If this variable is true, IPython will ask
88 # you whether to re-open the editor immediately to correct such an error.
95 # you whether to re-open the editor immediately to correct such an error.
89
96
90 autoedit_syntax 0
97 autoedit_syntax 0
91
98
92 # Auto-indent. IPython can recognize lines ending in ':' and indent the next
99 # Auto-indent. IPython can recognize lines ending in ':' and indent the next
93 # line, while also un-indenting automatically after 'raise' or 'return'.
100 # line, while also un-indenting automatically after 'raise' or 'return'.
94
101
95 # This feature uses the readline library, so it will honor your ~/.inputrc
102 # This feature uses the readline library, so it will honor your ~/.inputrc
96 # configuration (or whatever file your INPUTRC variable points to). Adding
103 # configuration (or whatever file your INPUTRC variable points to). Adding
97 # the following lines to your .inputrc file can make indent/unindenting more
104 # the following lines to your .inputrc file can make indent/unindenting more
98 # convenient (M-i indents, M-u unindents):
105 # convenient (M-i indents, M-u unindents):
99
106
100 # $if Python
107 # $if Python
101 # "\M-i": " "
108 # "\M-i": " "
102 # "\M-u": "\d\d\d\d"
109 # "\M-u": "\d\d\d\d"
103 # $endif
110 # $endif
104
111
105 # The feature is potentially a bit dangerous, because it can cause problems
112 # The feature is potentially a bit dangerous, because it can cause problems
106 # with pasting of indented code (the pasted code gets re-indented on each
113 # with pasting of indented code (the pasted code gets re-indented on each
107 # line). But it's a huge time-saver when working interactively. The magic
114 # line). But it's a huge time-saver when working interactively. The magic
108 # function %autoindent allows you to toggle it on/off at runtime.
115 # function %autoindent allows you to toggle it on/off at runtime.
109
116
110 autoindent 1
117 autoindent 1
111
118
112 # Auto-magic. This gives you access to all the magic functions without having
119 # Auto-magic. This gives you access to all the magic functions without having
113 # to prepend them with an % sign. If you define a variable with the same name
120 # to prepend them with an % sign. If you define a variable with the same name
114 # as a magic function (say who=1), you will need to access the magic function
121 # as a magic function (say who=1), you will need to access the magic function
115 # with % (%who in this example). However, if later you delete your variable
122 # with % (%who in this example). However, if later you delete your variable
116 # (del who), you'll recover the automagic calling form.
123 # (del who), you'll recover the automagic calling form.
117
124
118 # Considering that many magic functions provide a lot of shell-like
125 # Considering that many magic functions provide a lot of shell-like
119 # functionality, automagic gives you something close to a full Python+system
126 # functionality, automagic gives you something close to a full Python+system
120 # shell environment (and you can extend it further if you want).
127 # shell environment (and you can extend it further if you want).
121
128
122 automagic 1
129 automagic 1
123
130
124 # Size of the output cache. After this many entries are stored, the cache will
131 # Size of the output cache. After this many entries are stored, the cache will
125 # get flushed. Depending on the size of your intermediate calculations, you
132 # get flushed. Depending on the size of your intermediate calculations, you
126 # may have memory problems if you make it too big, since keeping things in the
133 # may have memory problems if you make it too big, since keeping things in the
127 # cache prevents Python from reclaiming the memory for old results. Experiment
134 # cache prevents Python from reclaiming the memory for old results. Experiment
128 # with a value that works well for you.
135 # with a value that works well for you.
129
136
130 # If you choose cache_size 0 IPython will revert to python's regular >>>
137 # If you choose cache_size 0 IPython will revert to python's regular >>>
131 # unnumbered prompt. You will still have _, __ and ___ for your last three
138 # unnumbered prompt. You will still have _, __ and ___ for your last three
132 # results, but that will be it. No dynamic _1, _2, etc. will be created. If
139 # results, but that will be it. No dynamic _1, _2, etc. will be created. If
133 # you are running on a slow machine or with very limited memory, this may
140 # you are running on a slow machine or with very limited memory, this may
134 # help.
141 # help.
135
142
136 cache_size 1000
143 cache_size 1000
137
144
138 # Classic mode: Setting 'classic 1' you lose many of IPython niceties,
145 # Classic mode: Setting 'classic 1' you lose many of IPython niceties,
139 # but that's your choice! Classic 1 -> same as IPython -classic.
146 # but that's your choice! Classic 1 -> same as IPython -classic.
140 # Note that this is _not_ the normal python interpreter, it's simply
147 # Note that this is _not_ the normal python interpreter, it's simply
141 # IPython emulating most of the classic interpreter's behavior.
148 # IPython emulating most of the classic interpreter's behavior.
142 classic 0
149 classic 0
143
150
144 # colors - Coloring option for prompts and traceback printouts.
151 # colors - Coloring option for prompts and traceback printouts.
145
152
146 # Currently available schemes: NoColor, Linux, LightBG.
153 # Currently available schemes: NoColor, Linux, LightBG.
147
154
148 # This option allows coloring the prompts and traceback printouts. This
155 # This option allows coloring the prompts and traceback printouts. This
149 # requires a terminal which can properly handle color escape sequences. If you
156 # requires a terminal which can properly handle color escape sequences. If you
150 # are having problems with this, use the NoColor scheme (uses no color escapes
157 # are having problems with this, use the NoColor scheme (uses no color escapes
151 # at all).
158 # at all).
152
159
153 # The Linux option works well in linux console type environments: dark
160 # The Linux option works well in linux console type environments: dark
154 # background with light fonts.
161 # background with light fonts.
155
162
156 # LightBG is similar to Linux but swaps dark/light colors to be more readable
163 # LightBG is similar to Linux but swaps dark/light colors to be more readable
157 # in light background terminals.
164 # in light background terminals.
158
165
159 # keep uncommented only the one you want:
166 # keep uncommented only the one you want:
160 colors Linux
167 colors Linux
161 #colors LightBG
168 #colors LightBG
162 #colors NoColor
169 #colors NoColor
163
170
164 ########################
171 ########################
165 # Note to Windows users
172 # Note to Windows users
166 #
173 #
167 # Color and readline support is avaialble to Windows users via Gary Bishop's
174 # Color and readline support is avaialble to Windows users via Gary Bishop's
168 # readline library. You can find Gary's tools at
175 # readline library. You can find Gary's tools at
169 # http://sourceforge.net/projects/uncpythontools.
176 # http://sourceforge.net/projects/uncpythontools.
170 # Note that his readline module requires in turn the ctypes library, available
177 # Note that his readline module requires in turn the ctypes library, available
171 # at http://starship.python.net/crew/theller/ctypes.
178 # at http://starship.python.net/crew/theller/ctypes.
172 ########################
179 ########################
173
180
174 # color_info: IPython can display information about objects via a set of
181 # color_info: IPython can display information about objects via a set of
175 # functions, and optionally can use colors for this, syntax highlighting
182 # functions, and optionally can use colors for this, syntax highlighting
176 # source code and various other elements. This information is passed through a
183 # source code and various other elements. This information is passed through a
177 # pager (it defaults to 'less' if $PAGER is not set).
184 # pager (it defaults to 'less' if $PAGER is not set).
178
185
179 # If your pager has problems, try to setting it to properly handle escapes
186 # If your pager has problems, try to setting it to properly handle escapes
180 # (see the less manpage for detail), or disable this option. The magic
187 # (see the less manpage for detail), or disable this option. The magic
181 # function %color_info allows you to toggle this interactively for testing.
188 # function %color_info allows you to toggle this interactively for testing.
182
189
183 color_info 1
190 color_info 1
184
191
185 # confirm_exit: set to 1 if you want IPython to confirm when you try to exit
192 # confirm_exit: set to 1 if you want IPython to confirm when you try to exit
186 # with an EOF (Control-d in Unix, Control-Z/Enter in Windows). Note that using
193 # with an EOF (Control-d in Unix, Control-Z/Enter in Windows). Note that using
187 # the magic functions %Exit or %Quit you can force a direct exit, bypassing
194 # the magic functions %Exit or %Quit you can force a direct exit, bypassing
188 # any confirmation.
195 # any confirmation.
189
196
190 confirm_exit 1
197 confirm_exit 1
191
198
192 # Use deep_reload() as a substitute for reload() by default. deep_reload() is
199 # Use deep_reload() as a substitute for reload() by default. deep_reload() is
193 # still available as dreload() and appears as a builtin.
200 # still available as dreload() and appears as a builtin.
194
201
195 deep_reload 0
202 deep_reload 0
196
203
197 # Which editor to use with the %edit command. If you leave this at 0, IPython
204 # Which editor to use with the %edit command. If you leave this at 0, IPython
198 # will honor your EDITOR environment variable. Since this editor is invoked on
205 # will honor your EDITOR environment variable. Since this editor is invoked on
199 # the fly by ipython and is meant for editing small code snippets, you may
206 # the fly by ipython and is meant for editing small code snippets, you may
200 # want to use a small, lightweight editor here.
207 # want to use a small, lightweight editor here.
201
208
202 # For Emacs users, setting up your Emacs server properly as described in the
209 # For Emacs users, setting up your Emacs server properly as described in the
203 # manual is a good idea. An alternative is to use jed, a very light editor
210 # manual is a good idea. An alternative is to use jed, a very light editor
204 # with much of the feel of Emacs (though not as powerful for heavy-duty work).
211 # with much of the feel of Emacs (though not as powerful for heavy-duty work).
205
212
206 editor 0
213 editor 0
207
214
208 # log 1 -> same as ipython -log. This automatically logs to ./ipython.log
215 # log 1 -> same as ipython -log. This automatically logs to ./ipython.log
209 log 0
216 log 0
210
217
211 # Same as ipython -Logfile YourLogfileName.
218 # Same as ipython -Logfile YourLogfileName.
212 # Don't use with log 1 (use one or the other)
219 # Don't use with log 1 (use one or the other)
213 logfile ''
220 logfile ''
214
221
215 # banner 0 -> same as ipython -nobanner
222 # banner 0 -> same as ipython -nobanner
216 banner 1
223 banner 1
217
224
218 # messages 0 -> same as ipython -nomessages
225 # messages 0 -> same as ipython -nomessages
219 messages 1
226 messages 1
220
227
221 # Automatically call the pdb debugger after every uncaught exception. If you
228 # Automatically call the pdb debugger after every uncaught exception. If you
222 # are used to debugging using pdb, this puts you automatically inside of it
229 # are used to debugging using pdb, this puts you automatically inside of it
223 # after any call (either in IPython or in code called by it) which triggers an
230 # after any call (either in IPython or in code called by it) which triggers an
224 # exception which goes uncaught.
231 # exception which goes uncaught.
225 pdb 0
232 pdb 0
226
233
227 # Enable the pprint module for printing. pprint tends to give a more readable
234 # Enable the pprint module for printing. pprint tends to give a more readable
228 # display (than print) for complex nested data structures.
235 # display (than print) for complex nested data structures.
229 pprint 1
236 pprint 1
230
237
231 # Prompt strings
238 # Prompt strings
232
239
233 # Most bash-like escapes can be used to customize IPython's prompts, as well as
240 # Most bash-like escapes can be used to customize IPython's prompts, as well as
234 # a few additional ones which are IPython-specific. All valid prompt escapes
241 # a few additional ones which are IPython-specific. All valid prompt escapes
235 # are described in detail in the Customization section of the IPython HTML/PDF
242 # are described in detail in the Customization section of the IPython HTML/PDF
236 # manual.
243 # manual.
237
244
238 # Use \# to represent the current prompt number, and quote them to protect
245 # Use \# to represent the current prompt number, and quote them to protect
239 # spaces.
246 # spaces.
240 prompt_in1 'In [\#]: '
247 prompt_in1 'In [\#]: '
241
248
242 # \D is replaced by as many dots as there are digits in the
249 # \D is replaced by as many dots as there are digits in the
243 # current value of \#.
250 # current value of \#.
244 prompt_in2 ' .\D.: '
251 prompt_in2 ' .\D.: '
245
252
246 prompt_out 'Out[\#]: '
253 prompt_out 'Out[\#]: '
247
254
248 # Select whether to left-pad the output prompts to match the length of the
255 # Select whether to left-pad the output prompts to match the length of the
249 # input ones. This allows you for example to use a simple '>' as an output
256 # input ones. This allows you for example to use a simple '>' as an output
250 # prompt, and yet have the output line up with the input. If set to false,
257 # prompt, and yet have the output line up with the input. If set to false,
251 # the output prompts will be unpadded (flush left).
258 # the output prompts will be unpadded (flush left).
252 prompts_pad_left 1
259 prompts_pad_left 1
253
260
254 # quick 1 -> same as ipython -quick
261 # quick 1 -> same as ipython -quick
255 quick 0
262 quick 0
256
263
257 # Use the readline library (1) or not (0). Most users will want this on, but
264 # Use the readline library (1) or not (0). Most users will want this on, but
258 # if you experience strange problems with line management (mainly when using
265 # if you experience strange problems with line management (mainly when using
259 # IPython inside Emacs buffers) you may try disabling it. Not having it on
266 # IPython inside Emacs buffers) you may try disabling it. Not having it on
260 # prevents you from getting command history with the arrow keys, searching and
267 # prevents you from getting command history with the arrow keys, searching and
261 # name completion using TAB.
268 # name completion using TAB.
262
269
263 readline 1
270 readline 1
264
271
265 # Screen Length: number of lines of your screen. This is used to control
272 # Screen Length: number of lines of your screen. This is used to control
266 # printing of very long strings. Strings longer than this number of lines will
273 # printing of very long strings. Strings longer than this number of lines will
267 # be paged with the less command instead of directly printed.
274 # be paged with the less command instead of directly printed.
268
275
269 # The default value for this is 0, which means IPython will auto-detect your
276 # The default value for this is 0, which means IPython will auto-detect your
270 # screen size every time it needs to print. If for some reason this isn't
277 # screen size every time it needs to print. If for some reason this isn't
271 # working well (it needs curses support), specify it yourself. Otherwise don't
278 # working well (it needs curses support), specify it yourself. Otherwise don't
272 # change the default.
279 # change the default.
273
280
274 screen_length 0
281 screen_length 0
275
282
276 # Prompt separators for input and output.
283 # Prompt separators for input and output.
277 # Use \n for newline explicitly, without quotes.
284 # Use \n for newline explicitly, without quotes.
278 # Use 0 (like at the cmd line) to turn off a given separator.
285 # Use 0 (like at the cmd line) to turn off a given separator.
279
286
280 # The structure of prompt printing is:
287 # The structure of prompt printing is:
281 # (SeparateIn)Input....
288 # (SeparateIn)Input....
282 # (SeparateOut)Output...
289 # (SeparateOut)Output...
283 # (SeparateOut2), # that is, no newline is printed after Out2
290 # (SeparateOut2), # that is, no newline is printed after Out2
284 # By choosing these you can organize your output any way you want.
291 # By choosing these you can organize your output any way you want.
285
292
286 separate_in \n
293 separate_in \n
287 separate_out 0
294 separate_out 0
288 separate_out2 0
295 separate_out2 0
289
296
290 # 'nosep 1' is a shorthand for '-SeparateIn 0 -SeparateOut 0 -SeparateOut2 0'.
297 # 'nosep 1' is a shorthand for '-SeparateIn 0 -SeparateOut 0 -SeparateOut2 0'.
291 # Simply removes all input/output separators, overriding the choices above.
298 # Simply removes all input/output separators, overriding the choices above.
292 nosep 0
299 nosep 0
293
300
294 # Wildcard searches - IPython has a system for searching names using
301 # Wildcard searches - IPython has a system for searching names using
295 # shell-like wildcards; type %psearch? for details. This variables sets
302 # shell-like wildcards; type %psearch? for details. This variables sets
296 # whether by default such searches should be case sensitive or not. You can
303 # whether by default such searches should be case sensitive or not. You can
297 # always override the default at the system command line or the IPython
304 # always override the default at the system command line or the IPython
298 # prompt.
305 # prompt.
299
306
300 wildcards_case_sensitive 1
307 wildcards_case_sensitive 1
301
308
302 # Object information: at what level of detail to display the string form of an
309 # Object information: at what level of detail to display the string form of an
303 # object. If set to 0, ipython will compute the string form of any object X,
310 # object. If set to 0, ipython will compute the string form of any object X,
304 # by calling str(X), when X? is typed. If set to 1, str(X) will only be
311 # by calling str(X), when X? is typed. If set to 1, str(X) will only be
305 # computed when X?? is given, and if set to 2 or higher, it will never be
312 # computed when X?? is given, and if set to 2 or higher, it will never be
306 # computed (there is no X??? level of detail). This is mostly of use to
313 # computed (there is no X??? level of detail). This is mostly of use to
307 # people who frequently manipulate objects whose string representation is
314 # people who frequently manipulate objects whose string representation is
308 # extremely expensive to compute.
315 # extremely expensive to compute.
309
316
310 object_info_string_level 0
317 object_info_string_level 0
311
318
312 # xmode - Exception reporting mode.
319 # xmode - Exception reporting mode.
313
320
314 # Valid modes: Plain, Context and Verbose.
321 # Valid modes: Plain, Context and Verbose.
315
322
316 # Plain: similar to python's normal traceback printing.
323 # Plain: similar to python's normal traceback printing.
317
324
318 # Context: prints 5 lines of context source code around each line in the
325 # Context: prints 5 lines of context source code around each line in the
319 # traceback.
326 # traceback.
320
327
321 # Verbose: similar to Context, but additionally prints the variables currently
328 # Verbose: similar to Context, but additionally prints the variables currently
322 # visible where the exception happened (shortening their strings if too
329 # visible where the exception happened (shortening their strings if too
323 # long). This can potentially be very slow, if you happen to have a huge data
330 # long). This can potentially be very slow, if you happen to have a huge data
324 # structure whose string representation is complex to compute. Your computer
331 # structure whose string representation is complex to compute. Your computer
325 # may appear to freeze for a while with cpu usage at 100%. If this occurs, you
332 # may appear to freeze for a while with cpu usage at 100%. If this occurs, you
326 # can cancel the traceback with Ctrl-C (maybe hitting it more than once).
333 # can cancel the traceback with Ctrl-C (maybe hitting it more than once).
327
334
328 #xmode Plain
335 #xmode Plain
329 xmode Context
336 xmode Context
330 #xmode Verbose
337 #xmode Verbose
331
338
332 # multi_line_specials: if true, allow magics, aliases and shell escapes (via
339 # multi_line_specials: if true, allow magics, aliases and shell escapes (via
333 # !cmd) to be used in multi-line input (like for loops). For example, if you
340 # !cmd) to be used in multi-line input (like for loops). For example, if you
334 # have this active, the following is valid in IPython:
341 # have this active, the following is valid in IPython:
335 #
342 #
336 #In [17]: for i in range(3):
343 #In [17]: for i in range(3):
337 # ....: mkdir $i
344 # ....: mkdir $i
338 # ....: !touch $i/hello
345 # ....: !touch $i/hello
339 # ....: ls -l $i
346 # ....: ls -l $i
340
347
341 multi_line_specials 1
348 multi_line_specials 1
342
349
343
350
344 # System calls: When IPython makes system calls (e.g. via special syntax like
351 # System calls: When IPython makes system calls (e.g. via special syntax like
345 # !cmd or !!cmd, or magics like %sc or %sx), it can print the command it is
352 # !cmd or !!cmd, or magics like %sc or %sx), it can print the command it is
346 # executing to standard output, prefixed by a header string.
353 # executing to standard output, prefixed by a header string.
347
354
348 system_header "IPython system call: "
355 system_header "IPython system call: "
349
356
350 system_verbose 1
357 system_verbose 1
351
358
352 # wxversion: request a specific wxPython version (used for -wthread)
359 # wxversion: request a specific wxPython version (used for -wthread)
353
360
354 # Set this to the value of wxPython you want to use, but note that this
361 # Set this to the value of wxPython you want to use, but note that this
355 # feature requires you to have the wxversion Python module to work. If you
362 # feature requires you to have the wxversion Python module to work. If you
356 # don't have the wxversion module (try 'import wxversion' at the prompt to
363 # don't have the wxversion module (try 'import wxversion' at the prompt to
357 # check) or simply want to leave the system to pick up the default, leave this
364 # check) or simply want to leave the system to pick up the default, leave this
358 # variable at 0.
365 # variable at 0.
359
366
360 wxversion 0
367 wxversion 0
361
368
362 #---------------------------------------------------------------------------
369 #---------------------------------------------------------------------------
363 # Section: Readline configuration (readline is not available for MS-Windows)
370 # Section: Readline configuration (readline is not available for MS-Windows)
364
371
365 # This is done via the following options:
372 # This is done via the following options:
366
373
367 # (i) readline_parse_and_bind: this option can appear as many times as you
374 # (i) readline_parse_and_bind: this option can appear as many times as you
368 # want, each time defining a string to be executed via a
375 # want, each time defining a string to be executed via a
369 # readline.parse_and_bind() command. The syntax for valid commands of this
376 # readline.parse_and_bind() command. The syntax for valid commands of this
370 # kind can be found by reading the documentation for the GNU readline library,
377 # kind can be found by reading the documentation for the GNU readline library,
371 # as these commands are of the kind which readline accepts in its
378 # as these commands are of the kind which readline accepts in its
372 # configuration file.
379 # configuration file.
373
380
374 # The TAB key can be used to complete names at the command line in one of two
381 # The TAB key can be used to complete names at the command line in one of two
375 # ways: 'complete' and 'menu-complete'. The difference is that 'complete' only
382 # ways: 'complete' and 'menu-complete'. The difference is that 'complete' only
376 # completes as much as possible while 'menu-complete' cycles through all
383 # completes as much as possible while 'menu-complete' cycles through all
377 # possible completions. Leave the one you prefer uncommented.
384 # possible completions. Leave the one you prefer uncommented.
378
385
379 readline_parse_and_bind tab: complete
386 readline_parse_and_bind tab: complete
380 #readline_parse_and_bind tab: menu-complete
387 #readline_parse_and_bind tab: menu-complete
381
388
382 # This binds Control-l to printing the list of all possible completions when
389 # This binds Control-l to printing the list of all possible completions when
383 # there is more than one (what 'complete' does when hitting TAB twice, or at
390 # there is more than one (what 'complete' does when hitting TAB twice, or at
384 # the first TAB if show-all-if-ambiguous is on)
391 # the first TAB if show-all-if-ambiguous is on)
385 readline_parse_and_bind "\C-l": possible-completions
392 readline_parse_and_bind "\C-l": possible-completions
386
393
387 # This forces readline to automatically print the above list when tab
394 # This forces readline to automatically print the above list when tab
388 # completion is set to 'complete'. You can still get this list manually by
395 # completion is set to 'complete'. You can still get this list manually by
389 # using the key bound to 'possible-completions' (Control-l by default) or by
396 # using the key bound to 'possible-completions' (Control-l by default) or by
390 # hitting TAB twice. Turning this on makes the printing happen at the first
397 # hitting TAB twice. Turning this on makes the printing happen at the first
391 # TAB.
398 # TAB.
392 readline_parse_and_bind set show-all-if-ambiguous on
399 readline_parse_and_bind set show-all-if-ambiguous on
393
400
394 # If you have TAB set to complete names, you can rebind any key (Control-o by
401 # If you have TAB set to complete names, you can rebind any key (Control-o by
395 # default) to insert a true TAB character.
402 # default) to insert a true TAB character.
396 readline_parse_and_bind "\C-o": tab-insert
403 readline_parse_and_bind "\C-o": tab-insert
397
404
398 # These commands allow you to indent/unindent easily, with the 4-space
405 # These commands allow you to indent/unindent easily, with the 4-space
399 # convention of the Python coding standards. Since IPython's internal
406 # convention of the Python coding standards. Since IPython's internal
400 # auto-indent system also uses 4 spaces, you should not change the number of
407 # auto-indent system also uses 4 spaces, you should not change the number of
401 # spaces in the code below.
408 # spaces in the code below.
402 readline_parse_and_bind "\M-i": " "
409 readline_parse_and_bind "\M-i": " "
403 readline_parse_and_bind "\M-o": "\d\d\d\d"
410 readline_parse_and_bind "\M-o": "\d\d\d\d"
404 readline_parse_and_bind "\M-I": "\d\d\d\d"
411 readline_parse_and_bind "\M-I": "\d\d\d\d"
405
412
406 # Bindings for incremental searches in the history. These searches use the
413 # Bindings for incremental searches in the history. These searches use the
407 # string typed so far on the command line and search anything in the previous
414 # string typed so far on the command line and search anything in the previous
408 # input history containing them.
415 # input history containing them.
409 readline_parse_and_bind "\C-r": reverse-search-history
416 readline_parse_and_bind "\C-r": reverse-search-history
410 readline_parse_and_bind "\C-s": forward-search-history
417 readline_parse_and_bind "\C-s": forward-search-history
411
418
412 # Bindings for completing the current line in the history of previous
419 # Bindings for completing the current line in the history of previous
413 # commands. This allows you to recall any previous command by typing its first
420 # commands. This allows you to recall any previous command by typing its first
414 # few letters and hitting Control-p, bypassing all intermediate commands which
421 # few letters and hitting Control-p, bypassing all intermediate commands which
415 # may be in the history (much faster than hitting up-arrow 50 times!)
422 # may be in the history (much faster than hitting up-arrow 50 times!)
416 readline_parse_and_bind "\C-p": history-search-backward
423 readline_parse_and_bind "\C-p": history-search-backward
417 readline_parse_and_bind "\C-n": history-search-forward
424 readline_parse_and_bind "\C-n": history-search-forward
418
425
419 # I also like to have the same functionality on the plain arrow keys. If you'd
426 # I also like to have the same functionality on the plain arrow keys. If you'd
420 # rather have the arrows use all the history (and not just match what you've
427 # rather have the arrows use all the history (and not just match what you've
421 # typed so far), comment out or delete the next two lines.
428 # typed so far), comment out or delete the next two lines.
422 readline_parse_and_bind "\e[A": history-search-backward
429 readline_parse_and_bind "\e[A": history-search-backward
423 readline_parse_and_bind "\e[B": history-search-forward
430 readline_parse_and_bind "\e[B": history-search-forward
424
431
425 # These are typically on by default under *nix, but not win32.
432 # These are typically on by default under *nix, but not win32.
426 readline_parse_and_bind "\C-k": kill-line
433 readline_parse_and_bind "\C-k": kill-line
427 readline_parse_and_bind "\C-u": unix-line-discard
434 readline_parse_and_bind "\C-u": unix-line-discard
428
435
429 # (ii) readline_remove_delims: a string of characters to be removed from the
436 # (ii) readline_remove_delims: a string of characters to be removed from the
430 # default word-delimiters list used by readline, so that completions may be
437 # default word-delimiters list used by readline, so that completions may be
431 # performed on strings which contain them.
438 # performed on strings which contain them.
432
439
433 readline_remove_delims -/~
440 readline_remove_delims -/~
434
441
435 # (iii) readline_merge_completions: whether to merge the result of all
442 # (iii) readline_merge_completions: whether to merge the result of all
436 # possible completions or not. If true, IPython will complete filenames,
443 # possible completions or not. If true, IPython will complete filenames,
437 # python names and aliases and return all possible completions. If you set it
444 # python names and aliases and return all possible completions. If you set it
438 # to false, each completer is used at a time, and only if it doesn't return
445 # to false, each completer is used at a time, and only if it doesn't return
439 # any completions is the next one used.
446 # any completions is the next one used.
440
447
441 # The default order is: [python_matches, file_matches, alias_matches]
448 # The default order is: [python_matches, file_matches, alias_matches]
442
449
443 readline_merge_completions 1
450 readline_merge_completions 1
444
451
445 # (iv) readline_omit__names: normally hitting <tab> after a '.' in a name
452 # (iv) readline_omit__names: normally hitting <tab> after a '.' in a name
446 # will complete all attributes of an object, including all the special methods
453 # will complete all attributes of an object, including all the special methods
447 # whose names start with single or double underscores (like __getitem__ or
454 # whose names start with single or double underscores (like __getitem__ or
448 # __class__).
455 # __class__).
449
456
450 # This variable allows you to control this completion behavior:
457 # This variable allows you to control this completion behavior:
451
458
452 # readline_omit__names 1 -> completion will omit showing any names starting
459 # readline_omit__names 1 -> completion will omit showing any names starting
453 # with two __, but it will still show names starting with one _.
460 # with two __, but it will still show names starting with one _.
454
461
455 # readline_omit__names 2 -> completion will omit all names beginning with one
462 # readline_omit__names 2 -> completion will omit all names beginning with one
456 # _ (which obviously means filtering out the double __ ones).
463 # _ (which obviously means filtering out the double __ ones).
457
464
458 # Even when this option is set, you can still see those names by explicitly
465 # Even when this option is set, you can still see those names by explicitly
459 # typing a _ after the period and hitting <tab>: 'name._<tab>' will always
466 # typing a _ after the period and hitting <tab>: 'name._<tab>' will always
460 # complete attribute names starting with '_'.
467 # complete attribute names starting with '_'.
461
468
462 # This option is off by default so that new users see all attributes of any
469 # This option is off by default so that new users see all attributes of any
463 # objects they are dealing with.
470 # objects they are dealing with.
464
471
465 readline_omit__names 0
472 readline_omit__names 0
466
473
467 #---------------------------------------------------------------------------
474 #---------------------------------------------------------------------------
468 # Section: modules to be loaded with 'import ...'
475 # Section: modules to be loaded with 'import ...'
469
476
470 # List, separated by spaces, the names of the modules you want to import
477 # List, separated by spaces, the names of the modules you want to import
471
478
472 # Example:
479 # Example:
473 # import_mod sys os
480 # import_mod sys os
474 # will produce internally the statements
481 # will produce internally the statements
475 # import sys
482 # import sys
476 # import os
483 # import os
477
484
478 # Each import is executed in its own try/except block, so if one module
485 # Each import is executed in its own try/except block, so if one module
479 # fails to load the others will still be ok.
486 # fails to load the others will still be ok.
480
487
481 import_mod
488 import_mod
482
489
483 #---------------------------------------------------------------------------
490 #---------------------------------------------------------------------------
484 # Section: modules to import some functions from: 'from ... import ...'
491 # Section: modules to import some functions from: 'from ... import ...'
485
492
486 # List, one per line, the modules for which you want only to import some
493 # List, one per line, the modules for which you want only to import some
487 # functions. Give the module name first and then the name of functions to be
494 # functions. Give the module name first and then the name of functions to be
488 # imported from that module.
495 # imported from that module.
489
496
490 # Example:
497 # Example:
491
498
492 # import_some IPython.genutils timing timings
499 # import_some IPython.genutils timing timings
493 # will produce internally the statement
500 # will produce internally the statement
494 # from IPython.genutils import timing, timings
501 # from IPython.genutils import timing, timings
495
502
496 # timing() and timings() are two IPython utilities for timing the execution of
503 # timing() and timings() are two IPython utilities for timing the execution of
497 # your own functions, which you may find useful. Just commment out the above
504 # your own functions, which you may find useful. Just commment out the above
498 # line if you want to test them.
505 # line if you want to test them.
499
506
500 # If you have more than one modules_some line, each gets its own try/except
507 # If you have more than one modules_some line, each gets its own try/except
501 # block (like modules, see above).
508 # block (like modules, see above).
502
509
503 import_some
510 import_some
504
511
505 #---------------------------------------------------------------------------
512 #---------------------------------------------------------------------------
506 # Section: modules to import all from : 'from ... import *'
513 # Section: modules to import all from : 'from ... import *'
507
514
508 # List (same syntax as import_mod above) those modules for which you want to
515 # List (same syntax as import_mod above) those modules for which you want to
509 # import all functions. Remember, this is a potentially dangerous thing to do,
516 # import all functions. Remember, this is a potentially dangerous thing to do,
510 # since it is very easy to overwrite names of things you need. Use with
517 # since it is very easy to overwrite names of things you need. Use with
511 # caution.
518 # caution.
512
519
513 # Example:
520 # Example:
514 # import_all sys os
521 # import_all sys os
515 # will produce internally the statements
522 # will produce internally the statements
516 # from sys import *
523 # from sys import *
517 # from os import *
524 # from os import *
518
525
519 # As before, each will be called in a separate try/except block.
526 # As before, each will be called in a separate try/except block.
520
527
521 import_all
528 import_all
522
529
523 #---------------------------------------------------------------------------
530 #---------------------------------------------------------------------------
524 # Section: Python code to execute.
531 # Section: Python code to execute.
525
532
526 # Put here code to be explicitly executed (keep it simple!)
533 # Put here code to be explicitly executed (keep it simple!)
527 # Put one line of python code per line. All whitespace is removed (this is a
534 # Put one line of python code per line. All whitespace is removed (this is a
528 # feature, not a bug), so don't get fancy building loops here.
535 # feature, not a bug), so don't get fancy building loops here.
529 # This is just for quick convenient creation of things you want available.
536 # This is just for quick convenient creation of things you want available.
530
537
531 # Example:
538 # Example:
532 # execute x = 1
539 # execute x = 1
533 # execute print 'hello world'; y = z = 'a'
540 # execute print 'hello world'; y = z = 'a'
534 # will produce internally
541 # will produce internally
535 # x = 1
542 # x = 1
536 # print 'hello world'; y = z = 'a'
543 # print 'hello world'; y = z = 'a'
537 # and each *line* (not each statement, we don't do python syntax parsing) is
544 # and each *line* (not each statement, we don't do python syntax parsing) is
538 # executed in its own try/except block.
545 # executed in its own try/except block.
539
546
540 execute
547 execute
541
548
542 # Note for the adventurous: you can use this to define your own names for the
549 # Note for the adventurous: you can use this to define your own names for the
543 # magic functions, by playing some namespace tricks:
550 # magic functions, by playing some namespace tricks:
544
551
545 # execute __IPYTHON__.magic_pf = __IPYTHON__.magic_profile
552 # execute __IPYTHON__.magic_pf = __IPYTHON__.magic_profile
546
553
547 # defines %pf as a new name for %profile.
554 # defines %pf as a new name for %profile.
548
555
549 #---------------------------------------------------------------------------
556 #---------------------------------------------------------------------------
550 # Section: Pyhton files to load and execute.
557 # Section: Pyhton files to load and execute.
551
558
552 # Put here the full names of files you want executed with execfile(file). If
559 # Put here the full names of files you want executed with execfile(file). If
553 # you want complicated initialization, just write whatever you want in a
560 # you want complicated initialization, just write whatever you want in a
554 # regular python file and load it from here.
561 # regular python file and load it from here.
555
562
556 # Filenames defined here (which *must* include the extension) are searched for
563 # Filenames defined here (which *must* include the extension) are searched for
557 # through all of sys.path. Since IPython adds your .ipython directory to
564 # through all of sys.path. Since IPython adds your .ipython directory to
558 # sys.path, they can also be placed in your .ipython dir and will be
565 # sys.path, they can also be placed in your .ipython dir and will be
559 # found. Otherwise (if you want to execute things not in .ipyton nor in
566 # found. Otherwise (if you want to execute things not in .ipyton nor in
560 # sys.path) give a full path (you can use ~, it gets expanded)
567 # sys.path) give a full path (you can use ~, it gets expanded)
561
568
562 # Example:
569 # Example:
563 # execfile file1.py ~/file2.py
570 # execfile file1.py ~/file2.py
564 # will generate
571 # will generate
565 # execfile('file1.py')
572 # execfile('file1.py')
566 # execfile('_path_to_your_home/file2.py')
573 # execfile('_path_to_your_home/file2.py')
567
574
568 # As before, each file gets its own try/except block.
575 # As before, each file gets its own try/except block.
569
576
570 execfile
577 execfile
571
578
572 # If you are feeling adventurous, you can even add functionality to IPython
579 # If you are feeling adventurous, you can even add functionality to IPython
573 # through here. IPython works through a global variable called __ip which
580 # through here. IPython works through a global variable called __ip which
574 # exists at the time when these files are read. If you know what you are doing
581 # exists at the time when these files are read. If you know what you are doing
575 # (read the source) you can add functions to __ip in files loaded here.
582 # (read the source) you can add functions to __ip in files loaded here.
576
583
577 # The file example-magic.py contains a simple but correct example. Try it:
584 # The file example-magic.py contains a simple but correct example. Try it:
578
585
579 # execfile example-magic.py
586 # execfile example-magic.py
580
587
581 # Look at the examples in IPython/iplib.py for more details on how these magic
588 # Look at the examples in IPython/iplib.py for more details on how these magic
582 # functions need to process their arguments.
589 # functions need to process their arguments.
583
590
584 #---------------------------------------------------------------------------
591 #---------------------------------------------------------------------------
585 # Section: aliases for system shell commands
592 # Section: aliases for system shell commands
586
593
587 # Here you can define your own names for system commands. The syntax is
594 # Here you can define your own names for system commands. The syntax is
588 # similar to that of the builtin %alias function:
595 # similar to that of the builtin %alias function:
589
596
590 # alias alias_name command_string
597 # alias alias_name command_string
591
598
592 # The resulting aliases are auto-generated magic functions (hence usable as
599 # The resulting aliases are auto-generated magic functions (hence usable as
593 # %alias_name)
600 # %alias_name)
594
601
595 # For example:
602 # For example:
596
603
597 # alias myls ls -la
604 # alias myls ls -la
598
605
599 # will define 'myls' as an alias for executing the system command 'ls -la'.
606 # will define 'myls' as an alias for executing the system command 'ls -la'.
600 # This allows you to customize IPython's environment to have the same aliases
607 # This allows you to customize IPython's environment to have the same aliases
601 # you are accustomed to from your own shell.
608 # you are accustomed to from your own shell.
602
609
603 # You can also define aliases with parameters using %s specifiers (one per
610 # You can also define aliases with parameters using %s specifiers (one per
604 # parameter):
611 # parameter):
605
612
606 # alias parts echo first %s second %s
613 # alias parts echo first %s second %s
607
614
608 # will give you in IPython:
615 # will give you in IPython:
609 # >>> %parts A B
616 # >>> %parts A B
610 # first A second B
617 # first A second B
611
618
612 # Use one 'alias' statement per alias you wish to define.
619 # Use one 'alias' statement per alias you wish to define.
613
620
614 # alias
621 # alias
615
622
616 #************************* end of file <ipythonrc> ************************
623 #************************* end of file <ipythonrc> ************************
@@ -1,755 +1,755 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 IPython -- An enhanced Interactive Python
3 IPython -- An enhanced Interactive Python
4
4
5 Requires Python 2.1 or better.
5 Requires Python 2.1 or better.
6
6
7 This file contains the main make_IPython() starter function.
7 This file contains the main make_IPython() starter function.
8
8
9 $Id: ipmaker.py 1879 2006-11-04 00:34:34Z fptest $"""
9 $Id: ipmaker.py 1979 2006-12-12 18:50:20Z vivainio $"""
10
10
11 #*****************************************************************************
11 #*****************************************************************************
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
13 #
13 #
14 # Distributed under the terms of the BSD License. The full license is in
14 # Distributed under the terms of the BSD License. The full license is in
15 # the file COPYING, distributed as part of this software.
15 # the file COPYING, distributed as part of this software.
16 #*****************************************************************************
16 #*****************************************************************************
17
17
18 from IPython import Release
18 from IPython import Release
19 __author__ = '%s <%s>' % Release.authors['Fernando']
19 __author__ = '%s <%s>' % Release.authors['Fernando']
20 __license__ = Release.license
20 __license__ = Release.license
21 __version__ = Release.version
21 __version__ = Release.version
22
22
23 credits._Printer__data = """
23 credits._Printer__data = """
24 Python: %s
24 Python: %s
25
25
26 IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
26 IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
27 See http://ipython.scipy.org for more information.""" \
27 See http://ipython.scipy.org for more information.""" \
28 % credits._Printer__data
28 % credits._Printer__data
29
29
30 copyright._Printer__data += """
30 copyright._Printer__data += """
31
31
32 Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
32 Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
33 All Rights Reserved."""
33 All Rights Reserved."""
34
34
35 #****************************************************************************
35 #****************************************************************************
36 # Required modules
36 # Required modules
37
37
38 # From the standard library
38 # From the standard library
39 import __main__
39 import __main__
40 import __builtin__
40 import __builtin__
41 import os
41 import os
42 import re
42 import re
43 import sys
43 import sys
44 import types
44 import types
45 from pprint import pprint,pformat
45 from pprint import pprint,pformat
46
46
47 # Our own
47 # Our own
48 from IPython import DPyGetOpt
48 from IPython import DPyGetOpt
49 from IPython.ipstruct import Struct
49 from IPython.ipstruct import Struct
50 from IPython.OutputTrap import OutputTrap
50 from IPython.OutputTrap import OutputTrap
51 from IPython.ConfigLoader import ConfigLoader
51 from IPython.ConfigLoader import ConfigLoader
52 from IPython.iplib import InteractiveShell
52 from IPython.iplib import InteractiveShell
53 from IPython.usage import cmd_line_usage,interactive_usage
53 from IPython.usage import cmd_line_usage,interactive_usage
54 from IPython.genutils import *
54 from IPython.genutils import *
55
55
56 #-----------------------------------------------------------------------------
56 #-----------------------------------------------------------------------------
57 def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1,
57 def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1,
58 rc_override=None,shell_class=InteractiveShell,
58 rc_override=None,shell_class=InteractiveShell,
59 embedded=False,**kw):
59 embedded=False,**kw):
60 """This is a dump of IPython into a single function.
60 """This is a dump of IPython into a single function.
61
61
62 Later it will have to be broken up in a sensible manner.
62 Later it will have to be broken up in a sensible manner.
63
63
64 Arguments:
64 Arguments:
65
65
66 - argv: a list similar to sys.argv[1:]. It should NOT contain the desired
66 - argv: a list similar to sys.argv[1:]. It should NOT contain the desired
67 script name, b/c DPyGetOpt strips the first argument only for the real
67 script name, b/c DPyGetOpt strips the first argument only for the real
68 sys.argv.
68 sys.argv.
69
69
70 - user_ns: a dict to be used as the user's namespace."""
70 - user_ns: a dict to be used as the user's namespace."""
71
71
72 #----------------------------------------------------------------------
72 #----------------------------------------------------------------------
73 # Defaults and initialization
73 # Defaults and initialization
74
74
75 # For developer debugging, deactivates crash handler and uses pdb.
75 # For developer debugging, deactivates crash handler and uses pdb.
76 DEVDEBUG = False
76 DEVDEBUG = False
77
77
78 if argv is None:
78 if argv is None:
79 argv = sys.argv
79 argv = sys.argv
80
80
81 # __IP is the main global that lives throughout and represents the whole
81 # __IP is the main global that lives throughout and represents the whole
82 # application. If the user redefines it, all bets are off as to what
82 # application. If the user redefines it, all bets are off as to what
83 # happens.
83 # happens.
84
84
85 # __IP is the name of he global which the caller will have accessible as
85 # __IP is the name of he global which the caller will have accessible as
86 # __IP.name. We set its name via the first parameter passed to
86 # __IP.name. We set its name via the first parameter passed to
87 # InteractiveShell:
87 # InteractiveShell:
88
88
89 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns,
89 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns,
90 embedded=embedded,**kw)
90 embedded=embedded,**kw)
91
91
92 # Put 'help' in the user namespace
92 # Put 'help' in the user namespace
93 from site import _Helper
93 from site import _Helper
94 IP.user_ns['help'] = _Helper()
94 IP.user_ns['help'] = _Helper()
95
95
96
96
97 if DEVDEBUG:
97 if DEVDEBUG:
98 # For developer debugging only (global flag)
98 # For developer debugging only (global flag)
99 from IPython import ultraTB
99 from IPython import ultraTB
100 sys.excepthook = ultraTB.VerboseTB(call_pdb=1)
100 sys.excepthook = ultraTB.VerboseTB(call_pdb=1)
101
101
102 IP.BANNER_PARTS = ['Python %s\n'
102 IP.BANNER_PARTS = ['Python %s\n'
103 'Type "copyright", "credits" or "license" '
103 'Type "copyright", "credits" or "license" '
104 'for more information.\n'
104 'for more information.\n'
105 % (sys.version.split('\n')[0],),
105 % (sys.version.split('\n')[0],),
106 "IPython %s -- An enhanced Interactive Python."
106 "IPython %s -- An enhanced Interactive Python."
107 % (__version__,),
107 % (__version__,),
108 """? -> Introduction to IPython's features.
108 """? -> Introduction to IPython's features.
109 %magic -> Information about IPython's 'magic' % functions.
109 %magic -> Information about IPython's 'magic' % functions.
110 help -> Python's own help system.
110 help -> Python's own help system.
111 object? -> Details about 'object'. ?object also works, ?? prints more.
111 object? -> Details about 'object'. ?object also works, ?? prints more.
112 """ ]
112 """ ]
113
113
114 IP.usage = interactive_usage
114 IP.usage = interactive_usage
115
115
116 # Platform-dependent suffix and directory names. We use _ipython instead
116 # Platform-dependent suffix and directory names. We use _ipython instead
117 # of .ipython under win32 b/c there's software that breaks with .named
117 # of .ipython under win32 b/c there's software that breaks with .named
118 # directories on that platform.
118 # directories on that platform.
119 if os.name == 'posix':
119 if os.name == 'posix':
120 rc_suffix = ''
120 rc_suffix = ''
121 ipdir_def = '.ipython'
121 ipdir_def = '.ipython'
122 else:
122 else:
123 rc_suffix = '.ini'
123 rc_suffix = '.ini'
124 ipdir_def = '_ipython'
124 ipdir_def = '_ipython'
125
125
126 # default directory for configuration
126 # default directory for configuration
127 ipythondir_def = os.path.abspath(os.environ.get('IPYTHONDIR',
127 ipythondir_def = os.path.abspath(os.environ.get('IPYTHONDIR',
128 os.path.join(IP.home_dir,ipdir_def)))
128 os.path.join(IP.home_dir,ipdir_def)))
129
129
130 sys.path.insert(0, '') # add . to sys.path. Fix from Prabhu Ramachandran
130 sys.path.insert(0, '') # add . to sys.path. Fix from Prabhu Ramachandran
131
131
132 # we need the directory where IPython itself is installed
132 # we need the directory where IPython itself is installed
133 import IPython
133 import IPython
134 IPython_dir = os.path.dirname(IPython.__file__)
134 IPython_dir = os.path.dirname(IPython.__file__)
135 del IPython
135 del IPython
136
136
137 #-------------------------------------------------------------------------
137 #-------------------------------------------------------------------------
138 # Command line handling
138 # Command line handling
139
139
140 # Valid command line options (uses DPyGetOpt syntax, like Perl's
140 # Valid command line options (uses DPyGetOpt syntax, like Perl's
141 # GetOpt::Long)
141 # GetOpt::Long)
142
142
143 # Any key not listed here gets deleted even if in the file (like session
143 # Any key not listed here gets deleted even if in the file (like session
144 # or profile). That's deliberate, to maintain the rc namespace clean.
144 # or profile). That's deliberate, to maintain the rc namespace clean.
145
145
146 # Each set of options appears twice: under _conv only the names are
146 # Each set of options appears twice: under _conv only the names are
147 # listed, indicating which type they must be converted to when reading the
147 # listed, indicating which type they must be converted to when reading the
148 # ipythonrc file. And under DPyGetOpt they are listed with the regular
148 # ipythonrc file. And under DPyGetOpt they are listed with the regular
149 # DPyGetOpt syntax (=s,=i,:f,etc).
149 # DPyGetOpt syntax (=s,=i,:f,etc).
150
150
151 # Make sure there's a space before each end of line (they get auto-joined!)
151 # Make sure there's a space before each end of line (they get auto-joined!)
152 cmdline_opts = ('autocall=i autoindent! automagic! banner! cache_size|cs=i '
152 cmdline_opts = ('autocall=i autoindent! automagic! banner! cache_size|cs=i '
153 'c=s classic|cl color_info! colors=s confirm_exit! '
153 'c=s classic|cl color_info! colors=s confirm_exit! '
154 'debug! deep_reload! editor=s log|l messages! nosep '
154 'debug! deep_reload! editor=s log|l messages! nosep '
155 'object_info_string_level=i pdb! '
155 'object_info_string_level=i pdb! '
156 'pprint! prompt_in1|pi1=s prompt_in2|pi2=s prompt_out|po=s '
156 'pprint! prompt_in1|pi1=s prompt_in2|pi2=s prompt_out|po=s '
157 'quick screen_length|sl=i prompts_pad_left=i '
157 'quick screen_length|sl=i prompts_pad_left=i '
158 'logfile|lf=s logplay|lp=s profile|p=s '
158 'logfile|lf=s logplay|lp=s profile|p=s '
159 'readline! readline_merge_completions! '
159 'readline! readline_merge_completions! '
160 'readline_omit__names! '
160 'readline_omit__names! '
161 'rcfile=s separate_in|si=s separate_out|so=s '
161 'rcfile=s separate_in|si=s separate_out|so=s '
162 'separate_out2|so2=s xmode=s wildcards_case_sensitive! '
162 'separate_out2|so2=s xmode=s wildcards_case_sensitive! '
163 'magic_docstrings system_verbose! '
163 'magic_docstrings system_verbose! '
164 'multi_line_specials! '
164 'multi_line_specials! '
165 'wxversion=s '
165 'wxversion=s '
166 'autoedit_syntax!')
166 'autoedit_syntax!')
167
167
168 # Options that can *only* appear at the cmd line (not in rcfiles).
168 # Options that can *only* appear at the cmd line (not in rcfiles).
169
169
170 # The "ignore" option is a kludge so that Emacs buffers don't crash, since
170 # The "ignore" option is a kludge so that Emacs buffers don't crash, since
171 # the 'C-c !' command in emacs automatically appends a -i option at the end.
171 # the 'C-c !' command in emacs automatically appends a -i option at the end.
172 cmdline_only = ('help ignore|i ipythondir=s Version upgrade '
172 cmdline_only = ('help ignore|i ipythondir=s Version upgrade '
173 'gthread! qthread! q4thread! wthread! pylab! tk!')
173 'gthread! qthread! q4thread! wthread! pylab! tk!')
174
174
175 # Build the actual name list to be used by DPyGetOpt
175 # Build the actual name list to be used by DPyGetOpt
176 opts_names = qw(cmdline_opts) + qw(cmdline_only)
176 opts_names = qw(cmdline_opts) + qw(cmdline_only)
177
177
178 # Set sensible command line defaults.
178 # Set sensible command line defaults.
179 # This should have everything from cmdline_opts and cmdline_only
179 # This should have everything from cmdline_opts and cmdline_only
180 opts_def = Struct(autocall = 1,
180 opts_def = Struct(autocall = 1,
181 autoedit_syntax = 0,
181 autoedit_syntax = 0,
182 autoindent = 0,
182 autoindent = 0,
183 automagic = 1,
183 automagic = 1,
184 banner = 1,
184 banner = 1,
185 cache_size = 1000,
185 cache_size = 1000,
186 c = '',
186 c = '',
187 classic = 0,
187 classic = 0,
188 colors = 'NoColor',
188 colors = 'NoColor',
189 color_info = 0,
189 color_info = 0,
190 confirm_exit = 1,
190 confirm_exit = 1,
191 debug = 0,
191 debug = 0,
192 deep_reload = 0,
192 deep_reload = 0,
193 editor = '0',
193 editor = '0',
194 help = 0,
194 help = 0,
195 ignore = 0,
195 ignore = 0,
196 ipythondir = ipythondir_def,
196 ipythondir = ipythondir_def,
197 log = 0,
197 log = 0,
198 logfile = '',
198 logfile = '',
199 logplay = '',
199 logplay = '',
200 multi_line_specials = 1,
200 multi_line_specials = 1,
201 messages = 1,
201 messages = 1,
202 object_info_string_level = 0,
202 object_info_string_level = 0,
203 nosep = 0,
203 nosep = 0,
204 pdb = 0,
204 pdb = 0,
205 pprint = 0,
205 pprint = 0,
206 profile = '',
206 profile = '',
207 prompt_in1 = 'In [\\#]: ',
207 prompt_in1 = 'In [\\#]: ',
208 prompt_in2 = ' .\\D.: ',
208 prompt_in2 = ' .\\D.: ',
209 prompt_out = 'Out[\\#]: ',
209 prompt_out = 'Out[\\#]: ',
210 prompts_pad_left = 1,
210 prompts_pad_left = 1,
211 quiet = 0,
211 quiet = 0,
212 quick = 0,
212 quick = 0,
213 readline = 1,
213 readline = 1,
214 readline_merge_completions = 1,
214 readline_merge_completions = 1,
215 readline_omit__names = 0,
215 readline_omit__names = 0,
216 rcfile = 'ipythonrc' + rc_suffix,
216 rcfile = 'ipythonrc' + rc_suffix,
217 screen_length = 0,
217 screen_length = 0,
218 separate_in = '\n',
218 separate_in = '\n',
219 separate_out = '\n',
219 separate_out = '\n',
220 separate_out2 = '',
220 separate_out2 = '',
221 system_header = 'IPython system call: ',
221 system_header = 'IPython system call: ',
222 system_verbose = 0,
222 system_verbose = 0,
223 gthread = 0,
223 gthread = 0,
224 qthread = 0,
224 qthread = 0,
225 q4thread = 0,
225 q4thread = 0,
226 wthread = 0,
226 wthread = 0,
227 pylab = 0,
227 pylab = 0,
228 tk = 0,
228 tk = 0,
229 upgrade = 0,
229 upgrade = 0,
230 Version = 0,
230 Version = 0,
231 xmode = 'Verbose',
231 xmode = 'Verbose',
232 wildcards_case_sensitive = 1,
232 wildcards_case_sensitive = 1,
233 wxversion = '0',
233 wxversion = '0',
234 magic_docstrings = 0, # undocumented, for doc generation
234 magic_docstrings = 0, # undocumented, for doc generation
235 )
235 )
236
236
237 # Things that will *only* appear in rcfiles (not at the command line).
237 # Things that will *only* appear in rcfiles (not at the command line).
238 # Make sure there's a space before each end of line (they get auto-joined!)
238 # Make sure there's a space before each end of line (they get auto-joined!)
239 rcfile_opts = { qwflat: 'include import_mod import_all execfile ',
239 rcfile_opts = { qwflat: 'include import_mod import_all execfile ',
240 qw_lol: 'import_some ',
240 qw_lol: 'import_some ',
241 # for things with embedded whitespace:
241 # for things with embedded whitespace:
242 list_strings:'execute alias readline_parse_and_bind ',
242 list_strings:'execute alias readline_parse_and_bind ',
243 # Regular strings need no conversion:
243 # Regular strings need no conversion:
244 None:'readline_remove_delims ',
244 None:'readline_remove_delims ',
245 }
245 }
246 # Default values for these
246 # Default values for these
247 rc_def = Struct(include = [],
247 rc_def = Struct(include = [],
248 import_mod = [],
248 import_mod = [],
249 import_all = [],
249 import_all = [],
250 import_some = [[]],
250 import_some = [[]],
251 execute = [],
251 execute = [],
252 execfile = [],
252 execfile = [],
253 alias = [],
253 alias = [],
254 readline_parse_and_bind = [],
254 readline_parse_and_bind = [],
255 readline_remove_delims = '',
255 readline_remove_delims = '',
256 )
256 )
257
257
258 # Build the type conversion dictionary from the above tables:
258 # Build the type conversion dictionary from the above tables:
259 typeconv = rcfile_opts.copy()
259 typeconv = rcfile_opts.copy()
260 typeconv.update(optstr2types(cmdline_opts))
260 typeconv.update(optstr2types(cmdline_opts))
261
261
262 # FIXME: the None key appears in both, put that back together by hand. Ugly!
262 # FIXME: the None key appears in both, put that back together by hand. Ugly!
263 typeconv[None] += ' ' + rcfile_opts[None]
263 typeconv[None] += ' ' + rcfile_opts[None]
264
264
265 # Remove quotes at ends of all strings (used to protect spaces)
265 # Remove quotes at ends of all strings (used to protect spaces)
266 typeconv[unquote_ends] = typeconv[None]
266 typeconv[unquote_ends] = typeconv[None]
267 del typeconv[None]
267 del typeconv[None]
268
268
269 # Build the list we'll use to make all config decisions with defaults:
269 # Build the list we'll use to make all config decisions with defaults:
270 opts_all = opts_def.copy()
270 opts_all = opts_def.copy()
271 opts_all.update(rc_def)
271 opts_all.update(rc_def)
272
272
273 # Build conflict resolver for recursive loading of config files:
273 # Build conflict resolver for recursive loading of config files:
274 # - preserve means the outermost file maintains the value, it is not
274 # - preserve means the outermost file maintains the value, it is not
275 # overwritten if an included file has the same key.
275 # overwritten if an included file has the same key.
276 # - add_flip applies + to the two values, so it better make sense to add
276 # - add_flip applies + to the two values, so it better make sense to add
277 # those types of keys. But it flips them first so that things loaded
277 # those types of keys. But it flips them first so that things loaded
278 # deeper in the inclusion chain have lower precedence.
278 # deeper in the inclusion chain have lower precedence.
279 conflict = {'preserve': ' '.join([ typeconv[int],
279 conflict = {'preserve': ' '.join([ typeconv[int],
280 typeconv[unquote_ends] ]),
280 typeconv[unquote_ends] ]),
281 'add_flip': ' '.join([ typeconv[qwflat],
281 'add_flip': ' '.join([ typeconv[qwflat],
282 typeconv[qw_lol],
282 typeconv[qw_lol],
283 typeconv[list_strings] ])
283 typeconv[list_strings] ])
284 }
284 }
285
285
286 # Now actually process the command line
286 # Now actually process the command line
287 getopt = DPyGetOpt.DPyGetOpt()
287 getopt = DPyGetOpt.DPyGetOpt()
288 getopt.setIgnoreCase(0)
288 getopt.setIgnoreCase(0)
289
289
290 getopt.parseConfiguration(opts_names)
290 getopt.parseConfiguration(opts_names)
291
291
292 try:
292 try:
293 getopt.processArguments(argv)
293 getopt.processArguments(argv)
294 except:
294 except:
295 print cmd_line_usage
295 print cmd_line_usage
296 warn('\nError in Arguments: ' + `sys.exc_value`)
296 warn('\nError in Arguments: ' + `sys.exc_value`)
297 sys.exit(1)
297 sys.exit(1)
298
298
299 # convert the options dict to a struct for much lighter syntax later
299 # convert the options dict to a struct for much lighter syntax later
300 opts = Struct(getopt.optionValues)
300 opts = Struct(getopt.optionValues)
301 args = getopt.freeValues
301 args = getopt.freeValues
302
302
303 # this is the struct (which has default values at this point) with which
303 # this is the struct (which has default values at this point) with which
304 # we make all decisions:
304 # we make all decisions:
305 opts_all.update(opts)
305 opts_all.update(opts)
306
306
307 # Options that force an immediate exit
307 # Options that force an immediate exit
308 if opts_all.help:
308 if opts_all.help:
309 page(cmd_line_usage)
309 page(cmd_line_usage)
310 sys.exit()
310 sys.exit()
311
311
312 if opts_all.Version:
312 if opts_all.Version:
313 print __version__
313 print __version__
314 sys.exit()
314 sys.exit()
315
315
316 if opts_all.magic_docstrings:
316 if opts_all.magic_docstrings:
317 IP.magic_magic('-latex')
317 IP.magic_magic('-latex')
318 sys.exit()
318 sys.exit()
319
319
320 # add personal ipythondir to sys.path so that users can put things in
320 # add personal ipythondir to sys.path so that users can put things in
321 # there for customization
321 # there for customization
322 sys.path.append(os.path.abspath(opts_all.ipythondir))
322 sys.path.append(os.path.abspath(opts_all.ipythondir))
323
323
324 # Create user config directory if it doesn't exist. This must be done
324 # Create user config directory if it doesn't exist. This must be done
325 # *after* getting the cmd line options.
325 # *after* getting the cmd line options.
326 if not os.path.isdir(opts_all.ipythondir):
326 if not os.path.isdir(opts_all.ipythondir):
327 IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
327 IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
328
328
329 # upgrade user config files while preserving a copy of the originals
329 # upgrade user config files while preserving a copy of the originals
330 if opts_all.upgrade:
330 if opts_all.upgrade:
331 IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
331 IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
332
332
333 # check mutually exclusive options in the *original* command line
333 # check mutually exclusive options in the *original* command line
334 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
334 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
335 qw('classic profile'),qw('classic rcfile')])
335 qw('classic profile'),qw('classic rcfile')])
336
336
337 #---------------------------------------------------------------------------
337 #---------------------------------------------------------------------------
338 # Log replay
338 # Log replay
339
339
340 # if -logplay, we need to 'become' the other session. That basically means
340 # if -logplay, we need to 'become' the other session. That basically means
341 # replacing the current command line environment with that of the old
341 # replacing the current command line environment with that of the old
342 # session and moving on.
342 # session and moving on.
343
343
344 # this is needed so that later we know we're in session reload mode, as
344 # this is needed so that later we know we're in session reload mode, as
345 # opts_all will get overwritten:
345 # opts_all will get overwritten:
346 load_logplay = 0
346 load_logplay = 0
347
347
348 if opts_all.logplay:
348 if opts_all.logplay:
349 load_logplay = opts_all.logplay
349 load_logplay = opts_all.logplay
350 opts_debug_save = opts_all.debug
350 opts_debug_save = opts_all.debug
351 try:
351 try:
352 logplay = open(opts_all.logplay)
352 logplay = open(opts_all.logplay)
353 except IOError:
353 except IOError:
354 if opts_all.debug: IP.InteractiveTB()
354 if opts_all.debug: IP.InteractiveTB()
355 warn('Could not open logplay file '+`opts_all.logplay`)
355 warn('Could not open logplay file '+`opts_all.logplay`)
356 # restore state as if nothing had happened and move on, but make
356 # restore state as if nothing had happened and move on, but make
357 # sure that later we don't try to actually load the session file
357 # sure that later we don't try to actually load the session file
358 logplay = None
358 logplay = None
359 load_logplay = 0
359 load_logplay = 0
360 del opts_all.logplay
360 del opts_all.logplay
361 else:
361 else:
362 try:
362 try:
363 logplay.readline()
363 logplay.readline()
364 logplay.readline();
364 logplay.readline();
365 # this reloads that session's command line
365 # this reloads that session's command line
366 cmd = logplay.readline()[6:]
366 cmd = logplay.readline()[6:]
367 exec cmd
367 exec cmd
368 # restore the true debug flag given so that the process of
368 # restore the true debug flag given so that the process of
369 # session loading itself can be monitored.
369 # session loading itself can be monitored.
370 opts.debug = opts_debug_save
370 opts.debug = opts_debug_save
371 # save the logplay flag so later we don't overwrite the log
371 # save the logplay flag so later we don't overwrite the log
372 opts.logplay = load_logplay
372 opts.logplay = load_logplay
373 # now we must update our own structure with defaults
373 # now we must update our own structure with defaults
374 opts_all.update(opts)
374 opts_all.update(opts)
375 # now load args
375 # now load args
376 cmd = logplay.readline()[6:]
376 cmd = logplay.readline()[6:]
377 exec cmd
377 exec cmd
378 logplay.close()
378 logplay.close()
379 except:
379 except:
380 logplay.close()
380 logplay.close()
381 if opts_all.debug: IP.InteractiveTB()
381 if opts_all.debug: IP.InteractiveTB()
382 warn("Logplay file lacking full configuration information.\n"
382 warn("Logplay file lacking full configuration information.\n"
383 "I'll try to read it, but some things may not work.")
383 "I'll try to read it, but some things may not work.")
384
384
385 #-------------------------------------------------------------------------
385 #-------------------------------------------------------------------------
386 # set up output traps: catch all output from files, being run, modules
386 # set up output traps: catch all output from files, being run, modules
387 # loaded, etc. Then give it to the user in a clean form at the end.
387 # loaded, etc. Then give it to the user in a clean form at the end.
388
388
389 msg_out = 'Output messages. '
389 msg_out = 'Output messages. '
390 msg_err = 'Error messages. '
390 msg_err = 'Error messages. '
391 msg_sep = '\n'
391 msg_sep = '\n'
392 msg = Struct(config = OutputTrap('Configuration Loader',msg_out,
392 msg = Struct(config = OutputTrap('Configuration Loader',msg_out,
393 msg_err,msg_sep,debug,
393 msg_err,msg_sep,debug,
394 quiet_out=1),
394 quiet_out=1),
395 user_exec = OutputTrap('User File Execution',msg_out,
395 user_exec = OutputTrap('User File Execution',msg_out,
396 msg_err,msg_sep,debug),
396 msg_err,msg_sep,debug),
397 logplay = OutputTrap('Log Loader',msg_out,
397 logplay = OutputTrap('Log Loader',msg_out,
398 msg_err,msg_sep,debug),
398 msg_err,msg_sep,debug),
399 summary = ''
399 summary = ''
400 )
400 )
401
401
402 #-------------------------------------------------------------------------
402 #-------------------------------------------------------------------------
403 # Process user ipythonrc-type configuration files
403 # Process user ipythonrc-type configuration files
404
404
405 # turn on output trapping and log to msg.config
405 # turn on output trapping and log to msg.config
406 # remember that with debug on, trapping is actually disabled
406 # remember that with debug on, trapping is actually disabled
407 msg.config.trap_all()
407 msg.config.trap_all()
408
408
409 # look for rcfile in current or default directory
409 # look for rcfile in current or default directory
410 try:
410 try:
411 opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
411 opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
412 except IOError:
412 except IOError:
413 if opts_all.debug: IP.InteractiveTB()
413 if opts_all.debug: IP.InteractiveTB()
414 warn('Configuration file %s not found. Ignoring request.'
414 warn('Configuration file %s not found. Ignoring request.'
415 % (opts_all.rcfile) )
415 % (opts_all.rcfile) )
416
416
417 # 'profiles' are a shorthand notation for config filenames
417 # 'profiles' are a shorthand notation for config filenames
418 if opts_all.profile:
418 if opts_all.profile:
419
419
420 try:
420 try:
421 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
421 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
422 + rc_suffix,
422 + rc_suffix,
423 opts_all.ipythondir)
423 opts_all.ipythondir)
424 except IOError:
424 except IOError:
425 if opts_all.debug: IP.InteractiveTB()
425 if opts_all.debug: IP.InteractiveTB()
426 opts.profile = '' # remove profile from options if invalid
426 opts.profile = '' # remove profile from options if invalid
427 # We won't warn anymore, primary method is ipy_profile_PROFNAME
427 # We won't warn anymore, primary method is ipy_profile_PROFNAME
428 # which does trigger a warning.
428 # which does trigger a warning.
429
429
430 # load the config file
430 # load the config file
431 rcfiledata = None
431 rcfiledata = None
432 if opts_all.quick:
432 if opts_all.quick:
433 print 'Launching IPython in quick mode. No config file read.'
433 print 'Launching IPython in quick mode. No config file read.'
434 elif opts_all.classic:
434 elif opts_all.classic:
435 print 'Launching IPython in classic mode. No config file read.'
435 print 'Launching IPython in classic mode. No config file read.'
436 elif opts_all.rcfile:
436 elif opts_all.rcfile:
437 try:
437 try:
438 cfg_loader = ConfigLoader(conflict)
438 cfg_loader = ConfigLoader(conflict)
439 rcfiledata = cfg_loader.load(opts_all.rcfile,typeconv,
439 rcfiledata = cfg_loader.load(opts_all.rcfile,typeconv,
440 'include',opts_all.ipythondir,
440 'include',opts_all.ipythondir,
441 purge = 1,
441 purge = 1,
442 unique = conflict['preserve'])
442 unique = conflict['preserve'])
443 except:
443 except:
444 IP.InteractiveTB()
444 IP.InteractiveTB()
445 warn('Problems loading configuration file '+
445 warn('Problems loading configuration file '+
446 `opts_all.rcfile`+
446 `opts_all.rcfile`+
447 '\nStarting with default -bare bones- configuration.')
447 '\nStarting with default -bare bones- configuration.')
448 else:
448 else:
449 warn('No valid configuration file found in either currrent directory\n'+
449 warn('No valid configuration file found in either currrent directory\n'+
450 'or in the IPython config. directory: '+`opts_all.ipythondir`+
450 'or in the IPython config. directory: '+`opts_all.ipythondir`+
451 '\nProceeding with internal defaults.')
451 '\nProceeding with internal defaults.')
452
452
453 #------------------------------------------------------------------------
453 #------------------------------------------------------------------------
454 # Set exception handlers in mode requested by user.
454 # Set exception handlers in mode requested by user.
455 otrap = OutputTrap(trap_out=1) # trap messages from magic_xmode
455 otrap = OutputTrap(trap_out=1) # trap messages from magic_xmode
456 IP.magic_xmode(opts_all.xmode)
456 IP.magic_xmode(opts_all.xmode)
457 otrap.release_out()
457 otrap.release_out()
458
458
459 #------------------------------------------------------------------------
459 #------------------------------------------------------------------------
460 # Execute user config
460 # Execute user config
461
461
462 # Create a valid config structure with the right precedence order:
462 # Create a valid config structure with the right precedence order:
463 # defaults < rcfile < command line. This needs to be in the instance, so
463 # defaults < rcfile < command line. This needs to be in the instance, so
464 # that method calls below that rely on it find it.
464 # that method calls below that rely on it find it.
465 IP.rc = rc_def.copy()
465 IP.rc = rc_def.copy()
466
466
467 # Work with a local alias inside this routine to avoid unnecessary
467 # Work with a local alias inside this routine to avoid unnecessary
468 # attribute lookups.
468 # attribute lookups.
469 IP_rc = IP.rc
469 IP_rc = IP.rc
470
470
471 IP_rc.update(opts_def)
471 IP_rc.update(opts_def)
472 if rcfiledata:
472 if rcfiledata:
473 # now we can update
473 # now we can update
474 IP_rc.update(rcfiledata)
474 IP_rc.update(rcfiledata)
475 IP_rc.update(opts)
475 IP_rc.update(opts)
476 IP_rc.update(rc_override)
476 IP_rc.update(rc_override)
477
477
478 # Store the original cmd line for reference:
478 # Store the original cmd line for reference:
479 IP_rc.opts = opts
479 IP_rc.opts = opts
480 IP_rc.args = args
480 IP_rc.args = args
481
481
482 # create a *runtime* Struct like rc for holding parameters which may be
482 # create a *runtime* Struct like rc for holding parameters which may be
483 # created and/or modified by runtime user extensions.
483 # created and/or modified by runtime user extensions.
484 IP.runtime_rc = Struct()
484 IP.runtime_rc = Struct()
485
485
486 # from this point on, all config should be handled through IP_rc,
486 # from this point on, all config should be handled through IP_rc,
487 # opts* shouldn't be used anymore.
487 # opts* shouldn't be used anymore.
488
488
489
489
490 # update IP_rc with some special things that need manual
490 # update IP_rc with some special things that need manual
491 # tweaks. Basically options which affect other options. I guess this
491 # tweaks. Basically options which affect other options. I guess this
492 # should just be written so that options are fully orthogonal and we
492 # should just be written so that options are fully orthogonal and we
493 # wouldn't worry about this stuff!
493 # wouldn't worry about this stuff!
494
494
495 if IP_rc.classic:
495 if IP_rc.classic:
496 IP_rc.quick = 1
496 IP_rc.quick = 1
497 IP_rc.cache_size = 0
497 IP_rc.cache_size = 0
498 IP_rc.pprint = 0
498 IP_rc.pprint = 0
499 IP_rc.prompt_in1 = '>>> '
499 IP_rc.prompt_in1 = '>>> '
500 IP_rc.prompt_in2 = '... '
500 IP_rc.prompt_in2 = '... '
501 IP_rc.prompt_out = ''
501 IP_rc.prompt_out = ''
502 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
502 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
503 IP_rc.colors = 'NoColor'
503 IP_rc.colors = 'NoColor'
504 IP_rc.xmode = 'Plain'
504 IP_rc.xmode = 'Plain'
505
505
506 IP.pre_config_initialization()
506 IP.pre_config_initialization()
507 # configure readline
507 # configure readline
508 # Define the history file for saving commands in between sessions
508 # Define the history file for saving commands in between sessions
509 if IP_rc.profile:
509 if IP_rc.profile:
510 histfname = 'history-%s' % IP_rc.profile
510 histfname = 'history-%s' % IP_rc.profile
511 else:
511 else:
512 histfname = 'history'
512 histfname = 'history'
513 IP.histfile = os.path.join(opts_all.ipythondir,histfname)
513 IP.histfile = os.path.join(opts_all.ipythondir,histfname)
514
514
515 # update exception handlers with rc file status
515 # update exception handlers with rc file status
516 otrap.trap_out() # I don't want these messages ever.
516 otrap.trap_out() # I don't want these messages ever.
517 IP.magic_xmode(IP_rc.xmode)
517 IP.magic_xmode(IP_rc.xmode)
518 otrap.release_out()
518 otrap.release_out()
519
519
520 # activate logging if requested and not reloading a log
520 # activate logging if requested and not reloading a log
521 if IP_rc.logplay:
521 if IP_rc.logplay:
522 IP.magic_logstart(IP_rc.logplay + ' append')
522 IP.magic_logstart(IP_rc.logplay + ' append')
523 elif IP_rc.logfile:
523 elif IP_rc.logfile:
524 IP.magic_logstart(IP_rc.logfile)
524 IP.magic_logstart(IP_rc.logfile)
525 elif IP_rc.log:
525 elif IP_rc.log:
526 IP.magic_logstart()
526 IP.magic_logstart()
527
527
528 # find user editor so that it we don't have to look it up constantly
528 # find user editor so that it we don't have to look it up constantly
529 if IP_rc.editor.strip()=='0':
529 if IP_rc.editor.strip()=='0':
530 try:
530 try:
531 ed = os.environ['EDITOR']
531 ed = os.environ['EDITOR']
532 except KeyError:
532 except KeyError:
533 if os.name == 'posix':
533 if os.name == 'posix':
534 ed = 'vi' # the only one guaranteed to be there!
534 ed = 'vi' # the only one guaranteed to be there!
535 else:
535 else:
536 ed = 'notepad' # same in Windows!
536 ed = 'notepad' # same in Windows!
537 IP_rc.editor = ed
537 IP_rc.editor = ed
538
538
539 # Keep track of whether this is an embedded instance or not (useful for
539 # Keep track of whether this is an embedded instance or not (useful for
540 # post-mortems).
540 # post-mortems).
541 IP_rc.embedded = IP.embedded
541 IP_rc.embedded = IP.embedded
542
542
543 # Recursive reload
543 # Recursive reload
544 try:
544 try:
545 from IPython import deep_reload
545 from IPython import deep_reload
546 if IP_rc.deep_reload:
546 if IP_rc.deep_reload:
547 __builtin__.reload = deep_reload.reload
547 __builtin__.reload = deep_reload.reload
548 else:
548 else:
549 __builtin__.dreload = deep_reload.reload
549 __builtin__.dreload = deep_reload.reload
550 del deep_reload
550 del deep_reload
551 except ImportError:
551 except ImportError:
552 pass
552 pass
553
553
554 # Save the current state of our namespace so that the interactive shell
554 # Save the current state of our namespace so that the interactive shell
555 # can later know which variables have been created by us from config files
555 # can later know which variables have been created by us from config files
556 # and loading. This way, loading a file (in any way) is treated just like
556 # and loading. This way, loading a file (in any way) is treated just like
557 # defining things on the command line, and %who works as expected.
557 # defining things on the command line, and %who works as expected.
558
558
559 # DON'T do anything that affects the namespace beyond this point!
559 # DON'T do anything that affects the namespace beyond this point!
560 IP.internal_ns.update(__main__.__dict__)
560 IP.internal_ns.update(__main__.__dict__)
561
561
562 #IP.internal_ns.update(locals()) # so our stuff doesn't show up in %who
562 #IP.internal_ns.update(locals()) # so our stuff doesn't show up in %who
563
563
564 # Now run through the different sections of the users's config
564 # Now run through the different sections of the users's config
565 if IP_rc.debug:
565 if IP_rc.debug:
566 print 'Trying to execute the following configuration structure:'
566 print 'Trying to execute the following configuration structure:'
567 print '(Things listed first are deeper in the inclusion tree and get'
567 print '(Things listed first are deeper in the inclusion tree and get'
568 print 'loaded first).\n'
568 print 'loaded first).\n'
569 pprint(IP_rc.__dict__)
569 pprint(IP_rc.__dict__)
570
570
571 for mod in IP_rc.import_mod:
571 for mod in IP_rc.import_mod:
572 try:
572 try:
573 exec 'import '+mod in IP.user_ns
573 exec 'import '+mod in IP.user_ns
574 except :
574 except :
575 IP.InteractiveTB()
575 IP.InteractiveTB()
576 import_fail_info(mod)
576 import_fail_info(mod)
577
577
578 for mod_fn in IP_rc.import_some:
578 for mod_fn in IP_rc.import_some:
579 if mod_fn == []: break
579 if not mod_fn == []:
580 mod,fn = mod_fn[0],','.join(mod_fn[1:])
580 mod,fn = mod_fn[0],','.join(mod_fn[1:])
581 try:
581 try:
582 exec 'from '+mod+' import '+fn in IP.user_ns
582 exec 'from '+mod+' import '+fn in IP.user_ns
583 except :
583 except :
584 IP.InteractiveTB()
584 IP.InteractiveTB()
585 import_fail_info(mod,fn)
585 import_fail_info(mod,fn)
586
586
587 for mod in IP_rc.import_all:
587 for mod in IP_rc.import_all:
588 try:
588 try:
589 exec 'from '+mod+' import *' in IP.user_ns
589 exec 'from '+mod+' import *' in IP.user_ns
590 except :
590 except :
591 IP.InteractiveTB()
591 IP.InteractiveTB()
592 import_fail_info(mod)
592 import_fail_info(mod)
593
593
594 for code in IP_rc.execute:
594 for code in IP_rc.execute:
595 try:
595 try:
596 exec code in IP.user_ns
596 exec code in IP.user_ns
597 except:
597 except:
598 IP.InteractiveTB()
598 IP.InteractiveTB()
599 warn('Failure executing code: ' + `code`)
599 warn('Failure executing code: ' + `code`)
600
600
601 # Execute the files the user wants in ipythonrc
601 # Execute the files the user wants in ipythonrc
602 for file in IP_rc.execfile:
602 for file in IP_rc.execfile:
603 try:
603 try:
604 file = filefind(file,sys.path+[IPython_dir])
604 file = filefind(file,sys.path+[IPython_dir])
605 except IOError:
605 except IOError:
606 warn(itpl('File $file not found. Skipping it.'))
606 warn(itpl('File $file not found. Skipping it.'))
607 else:
607 else:
608 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
608 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
609
609
610 # finally, try importing ipy_*_conf for final configuration
610 # finally, try importing ipy_*_conf for final configuration
611 try:
611 try:
612 import ipy_system_conf
612 import ipy_system_conf
613 except ImportError:
613 except ImportError:
614 if opts_all.debug: IP.InteractiveTB()
614 if opts_all.debug: IP.InteractiveTB()
615 warn("Could not import 'ipy_system_conf'")
615 warn("Could not import 'ipy_system_conf'")
616 except:
616 except:
617 IP.InteractiveTB()
617 IP.InteractiveTB()
618 import_fail_info('ipy_system_conf')
618 import_fail_info('ipy_system_conf')
619
619
620 if opts_all.profile:
620 if opts_all.profile:
621 profmodname = 'ipy_profile_' + opts_all.profile
621 profmodname = 'ipy_profile_' + opts_all.profile
622 try:
622 try:
623 __import__(profmodname)
623 __import__(profmodname)
624 except ImportError:
624 except ImportError:
625 # only warn if ipythonrc-PROFNAME didn't exist
625 # only warn if ipythonrc-PROFNAME didn't exist
626 if opts.profile =='':
626 if opts.profile =='':
627 warn("Could not start with profile '%s'!\n"
627 warn("Could not start with profile '%s'!\n"
628 "('%s/%s.py' does not exist? run '%%upgrade')" %
628 "('%s/%s.py' does not exist? run '%%upgrade')" %
629 (opts_all.profile, opts_all.ipythondir, profmodname) )
629 (opts_all.profile, opts_all.ipythondir, profmodname) )
630 except:
630 except:
631 print "Error importing",profmodname
631 print "Error importing",profmodname
632 IP.InteractiveTB()
632 IP.InteractiveTB()
633 import_fail_info(profmodname)
633 import_fail_info(profmodname)
634
634
635 try:
635 try:
636 import ipy_user_conf
636 import ipy_user_conf
637 except ImportError:
637 except ImportError:
638 if opts_all.debug: IP.InteractiveTB()
638 if opts_all.debug: IP.InteractiveTB()
639 warn("Could not import user config!\n "
639 warn("Could not import user config!\n "
640 "('%s/ipy_user_conf.py' does not exist? Please run '%%upgrade')\n"
640 "('%s/ipy_user_conf.py' does not exist? Please run '%%upgrade')\n"
641 % opts_all.ipythondir)
641 % opts_all.ipythondir)
642 except:
642 except:
643 print "Error importing ipy_user_conf"
643 print "Error importing ipy_user_conf"
644 IP.InteractiveTB()
644 IP.InteractiveTB()
645 import_fail_info("ipy_user_conf")
645 import_fail_info("ipy_user_conf")
646
646
647 # release stdout and stderr and save config log into a global summary
647 # release stdout and stderr and save config log into a global summary
648 msg.config.release_all()
648 msg.config.release_all()
649 if IP_rc.messages:
649 if IP_rc.messages:
650 msg.summary += msg.config.summary_all()
650 msg.summary += msg.config.summary_all()
651
651
652 #------------------------------------------------------------------------
652 #------------------------------------------------------------------------
653 # Setup interactive session
653 # Setup interactive session
654
654
655 # Now we should be fully configured. We can then execute files or load
655 # Now we should be fully configured. We can then execute files or load
656 # things only needed for interactive use. Then we'll open the shell.
656 # things only needed for interactive use. Then we'll open the shell.
657
657
658 # Take a snapshot of the user namespace before opening the shell. That way
658 # Take a snapshot of the user namespace before opening the shell. That way
659 # we'll be able to identify which things were interactively defined and
659 # we'll be able to identify which things were interactively defined and
660 # which were defined through config files.
660 # which were defined through config files.
661 IP.user_config_ns = IP.user_ns.copy()
661 IP.user_config_ns = IP.user_ns.copy()
662
662
663 # Force reading a file as if it were a session log. Slower but safer.
663 # Force reading a file as if it were a session log. Slower but safer.
664 if load_logplay:
664 if load_logplay:
665 print 'Replaying log...'
665 print 'Replaying log...'
666 try:
666 try:
667 if IP_rc.debug:
667 if IP_rc.debug:
668 logplay_quiet = 0
668 logplay_quiet = 0
669 else:
669 else:
670 logplay_quiet = 1
670 logplay_quiet = 1
671
671
672 msg.logplay.trap_all()
672 msg.logplay.trap_all()
673 IP.safe_execfile(load_logplay,IP.user_ns,
673 IP.safe_execfile(load_logplay,IP.user_ns,
674 islog = 1, quiet = logplay_quiet)
674 islog = 1, quiet = logplay_quiet)
675 msg.logplay.release_all()
675 msg.logplay.release_all()
676 if IP_rc.messages:
676 if IP_rc.messages:
677 msg.summary += msg.logplay.summary_all()
677 msg.summary += msg.logplay.summary_all()
678 except:
678 except:
679 warn('Problems replaying logfile %s.' % load_logplay)
679 warn('Problems replaying logfile %s.' % load_logplay)
680 IP.InteractiveTB()
680 IP.InteractiveTB()
681
681
682 # Load remaining files in command line
682 # Load remaining files in command line
683 msg.user_exec.trap_all()
683 msg.user_exec.trap_all()
684
684
685 # Do NOT execute files named in the command line as scripts to be loaded
685 # Do NOT execute files named in the command line as scripts to be loaded
686 # by embedded instances. Doing so has the potential for an infinite
686 # by embedded instances. Doing so has the potential for an infinite
687 # recursion if there are exceptions thrown in the process.
687 # recursion if there are exceptions thrown in the process.
688
688
689 # XXX FIXME: the execution of user files should be moved out to after
689 # XXX FIXME: the execution of user files should be moved out to after
690 # ipython is fully initialized, just as if they were run via %run at the
690 # ipython is fully initialized, just as if they were run via %run at the
691 # ipython prompt. This would also give them the benefit of ipython's
691 # ipython prompt. This would also give them the benefit of ipython's
692 # nice tracebacks.
692 # nice tracebacks.
693
693
694 if (not embedded and IP_rc.args and
694 if (not embedded and IP_rc.args and
695 not IP_rc.args[0].lower().endswith('.ipy')):
695 not IP_rc.args[0].lower().endswith('.ipy')):
696 name_save = IP.user_ns['__name__']
696 name_save = IP.user_ns['__name__']
697 IP.user_ns['__name__'] = '__main__'
697 IP.user_ns['__name__'] = '__main__'
698 # Set our own excepthook in case the user code tries to call it
698 # Set our own excepthook in case the user code tries to call it
699 # directly. This prevents triggering the IPython crash handler.
699 # directly. This prevents triggering the IPython crash handler.
700 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
700 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
701
701
702 save_argv = sys.argv[1:] # save it for later restoring
702 save_argv = sys.argv[1:] # save it for later restoring
703
703
704 sys.argv = args
704 sys.argv = args
705
705
706 try:
706 try:
707 IP.safe_execfile(args[0], IP.user_ns)
707 IP.safe_execfile(args[0], IP.user_ns)
708 finally:
708 finally:
709 # Reset our crash handler in place
709 # Reset our crash handler in place
710 sys.excepthook = old_excepthook
710 sys.excepthook = old_excepthook
711 sys.argv[:] = save_argv
711 sys.argv[:] = save_argv
712 IP.user_ns['__name__'] = name_save
712 IP.user_ns['__name__'] = name_save
713
713
714 msg.user_exec.release_all()
714 msg.user_exec.release_all()
715
715
716 if IP_rc.messages:
716 if IP_rc.messages:
717 msg.summary += msg.user_exec.summary_all()
717 msg.summary += msg.user_exec.summary_all()
718
718
719 # since we can't specify a null string on the cmd line, 0 is the equivalent:
719 # since we can't specify a null string on the cmd line, 0 is the equivalent:
720 if IP_rc.nosep:
720 if IP_rc.nosep:
721 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
721 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
722 if IP_rc.separate_in == '0': IP_rc.separate_in = ''
722 if IP_rc.separate_in == '0': IP_rc.separate_in = ''
723 if IP_rc.separate_out == '0': IP_rc.separate_out = ''
723 if IP_rc.separate_out == '0': IP_rc.separate_out = ''
724 if IP_rc.separate_out2 == '0': IP_rc.separate_out2 = ''
724 if IP_rc.separate_out2 == '0': IP_rc.separate_out2 = ''
725 IP_rc.separate_in = IP_rc.separate_in.replace('\\n','\n')
725 IP_rc.separate_in = IP_rc.separate_in.replace('\\n','\n')
726 IP_rc.separate_out = IP_rc.separate_out.replace('\\n','\n')
726 IP_rc.separate_out = IP_rc.separate_out.replace('\\n','\n')
727 IP_rc.separate_out2 = IP_rc.separate_out2.replace('\\n','\n')
727 IP_rc.separate_out2 = IP_rc.separate_out2.replace('\\n','\n')
728
728
729 # Determine how many lines at the bottom of the screen are needed for
729 # Determine how many lines at the bottom of the screen are needed for
730 # showing prompts, so we can know wheter long strings are to be printed or
730 # showing prompts, so we can know wheter long strings are to be printed or
731 # paged:
731 # paged:
732 num_lines_bot = IP_rc.separate_in.count('\n')+1
732 num_lines_bot = IP_rc.separate_in.count('\n')+1
733 IP_rc.screen_length = IP_rc.screen_length - num_lines_bot
733 IP_rc.screen_length = IP_rc.screen_length - num_lines_bot
734
734
735 # configure startup banner
735 # configure startup banner
736 if IP_rc.c: # regular python doesn't print the banner with -c
736 if IP_rc.c: # regular python doesn't print the banner with -c
737 IP_rc.banner = 0
737 IP_rc.banner = 0
738 if IP_rc.banner:
738 if IP_rc.banner:
739 BANN_P = IP.BANNER_PARTS
739 BANN_P = IP.BANNER_PARTS
740 else:
740 else:
741 BANN_P = []
741 BANN_P = []
742
742
743 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile)
743 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile)
744
744
745 # add message log (possibly empty)
745 # add message log (possibly empty)
746 if msg.summary: BANN_P.append(msg.summary)
746 if msg.summary: BANN_P.append(msg.summary)
747 # Final banner is a string
747 # Final banner is a string
748 IP.BANNER = '\n'.join(BANN_P)
748 IP.BANNER = '\n'.join(BANN_P)
749
749
750 # Finalize the IPython instance. This assumes the rc structure is fully
750 # Finalize the IPython instance. This assumes the rc structure is fully
751 # in place.
751 # in place.
752 IP.post_config_initialization()
752 IP.post_config_initialization()
753
753
754 return IP
754 return IP
755 #************************ end of file <ipmaker.py> **************************
755 #************************ end of file <ipmaker.py> **************************
@@ -1,6072 +1,6082 b''
1 2006-12-12 Ville Vainio <vivainio@gmail.com>
2
3 * ipmaker.py: apply david cournapeau's patch to make
4 import_some work properly even when ipythonrc does
5 import_some on empty list (it was an old bug!).
6
7 * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc:
8 Add deprecation note to ipythonrc and a url to wiki
9 in ipy_user_conf.py
10
1 2006-12-08 Ville Vainio <vivainio@gmail.com>
11 2006-12-08 Ville Vainio <vivainio@gmail.com>
2
12
3 * Extensions/ipy_stock_completers.py.py: fix cd completer
13 * Extensions/ipy_stock_completers.py.py: fix cd completer
4 to translate /'s to \'s again.
14 to translate /'s to \'s again.
5
15
6 * completer.py: prevent traceback on file completions w/
16 * completer.py: prevent traceback on file completions w/
7 backslash.
17 backslash.
8
18
9 * Release.py: Update release number to 0.7.3b3 for release
19 * Release.py: Update release number to 0.7.3b3 for release
10
20
11 2006-12-07 Ville Vainio <vivainio@gmail.com>
21 2006-12-07 Ville Vainio <vivainio@gmail.com>
12
22
13 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
23 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
14 while executing external code. Provides more shell-like behaviour
24 while executing external code. Provides more shell-like behaviour
15 and overall better response to ctrl + C / ctrl + break.
25 and overall better response to ctrl + C / ctrl + break.
16
26
17 * tools/make_tarball.py: new script to create tarball straight from svn
27 * tools/make_tarball.py: new script to create tarball straight from svn
18 (setup.py sdist doesn't work on win32).
28 (setup.py sdist doesn't work on win32).
19
29
20 * Extensions/ipy_stock_completers.py: fix cd completer to give up
30 * Extensions/ipy_stock_completers.py: fix cd completer to give up
21 on dirnames with spaces and use the default completer instead.
31 on dirnames with spaces and use the default completer instead.
22
32
23 * Revision.py: Change version to 0.7.3b2 for release.
33 * Revision.py: Change version to 0.7.3b2 for release.
24
34
25 2006-12-05 Ville Vainio <vivainio@gmail.com>
35 2006-12-05 Ville Vainio <vivainio@gmail.com>
26
36
27 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
37 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
28 pydb patch 4 (rm debug printing, py 2.5 checking)
38 pydb patch 4 (rm debug printing, py 2.5 checking)
29
39
30 2006-11-30 Walter Doerwald <walter@livinglogic.de>
40 2006-11-30 Walter Doerwald <walter@livinglogic.de>
31 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
41 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
32 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
42 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
33 "refreshfind" (mapped to "R") does the same but tries to go back to the same
43 "refreshfind" (mapped to "R") does the same but tries to go back to the same
34 object the cursor was on before the refresh. The command "markrange" is
44 object the cursor was on before the refresh. The command "markrange" is
35 mapped to "%" now.
45 mapped to "%" now.
36 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
46 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
37
47
38 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
48 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
39
49
40 * IPython/Magic.py (magic_debug): new %debug magic to activate the
50 * IPython/Magic.py (magic_debug): new %debug magic to activate the
41 interactive debugger on the last traceback, without having to call
51 interactive debugger on the last traceback, without having to call
42 %pdb and rerun your code. Made minor changes in various modules,
52 %pdb and rerun your code. Made minor changes in various modules,
43 should automatically recognize pydb if available.
53 should automatically recognize pydb if available.
44
54
45 2006-11-28 Ville Vainio <vivainio@gmail.com>
55 2006-11-28 Ville Vainio <vivainio@gmail.com>
46
56
47 * completer.py: If the text start with !, show file completions
57 * completer.py: If the text start with !, show file completions
48 properly. This helps when trying to complete command name
58 properly. This helps when trying to complete command name
49 for shell escapes.
59 for shell escapes.
50
60
51 2006-11-27 Ville Vainio <vivainio@gmail.com>
61 2006-11-27 Ville Vainio <vivainio@gmail.com>
52
62
53 * ipy_stock_completers.py: bzr completer submitted by Stefan van
63 * ipy_stock_completers.py: bzr completer submitted by Stefan van
54 der Walt. Clean up svn and hg completers by using a common
64 der Walt. Clean up svn and hg completers by using a common
55 vcs_completer.
65 vcs_completer.
56
66
57 2006-11-26 Ville Vainio <vivainio@gmail.com>
67 2006-11-26 Ville Vainio <vivainio@gmail.com>
58
68
59 * Remove ipconfig and %config; you should use _ip.options structure
69 * Remove ipconfig and %config; you should use _ip.options structure
60 directly instead!
70 directly instead!
61
71
62 * genutils.py: add wrap_deprecated function for deprecating callables
72 * genutils.py: add wrap_deprecated function for deprecating callables
63
73
64 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
74 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
65 _ip.system instead. ipalias is redundant.
75 _ip.system instead. ipalias is redundant.
66
76
67 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
77 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
68 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
78 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
69 explicit.
79 explicit.
70
80
71 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
81 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
72 completer. Try it by entering 'hg ' and pressing tab.
82 completer. Try it by entering 'hg ' and pressing tab.
73
83
74 * macro.py: Give Macro a useful __repr__ method
84 * macro.py: Give Macro a useful __repr__ method
75
85
76 * Magic.py: %whos abbreviates the typename of Macro for brevity.
86 * Magic.py: %whos abbreviates the typename of Macro for brevity.
77
87
78 2006-11-24 Walter Doerwald <walter@livinglogic.de>
88 2006-11-24 Walter Doerwald <walter@livinglogic.de>
79 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
89 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
80 we don't get a duplicate ipipe module, where registration of the xrepr
90 we don't get a duplicate ipipe module, where registration of the xrepr
81 implementation for Text is useless.
91 implementation for Text is useless.
82
92
83 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
93 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
84
94
85 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
95 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
86
96
87 2006-11-24 Ville Vainio <vivainio@gmail.com>
97 2006-11-24 Ville Vainio <vivainio@gmail.com>
88
98
89 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
99 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
90 try to use "cProfile" instead of the slower pure python
100 try to use "cProfile" instead of the slower pure python
91 "profile"
101 "profile"
92
102
93 2006-11-23 Ville Vainio <vivainio@gmail.com>
103 2006-11-23 Ville Vainio <vivainio@gmail.com>
94
104
95 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
105 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
96 Qt+IPython+Designer link in documentation.
106 Qt+IPython+Designer link in documentation.
97
107
98 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
108 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
99 correct Pdb object to %pydb.
109 correct Pdb object to %pydb.
100
110
101
111
102 2006-11-22 Walter Doerwald <walter@livinglogic.de>
112 2006-11-22 Walter Doerwald <walter@livinglogic.de>
103 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
113 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
104 generic xrepr(), otherwise the list implementation would kick in.
114 generic xrepr(), otherwise the list implementation would kick in.
105
115
106 2006-11-21 Ville Vainio <vivainio@gmail.com>
116 2006-11-21 Ville Vainio <vivainio@gmail.com>
107
117
108 * upgrade_dir.py: Now actually overwrites a nonmodified user file
118 * upgrade_dir.py: Now actually overwrites a nonmodified user file
109 with one from UserConfig.
119 with one from UserConfig.
110
120
111 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
121 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
112 it was missing which broke the sh profile.
122 it was missing which broke the sh profile.
113
123
114 * completer.py: file completer now uses explicit '/' instead
124 * completer.py: file completer now uses explicit '/' instead
115 of os.path.join, expansion of 'foo' was broken on win32
125 of os.path.join, expansion of 'foo' was broken on win32
116 if there was one directory with name 'foobar'.
126 if there was one directory with name 'foobar'.
117
127
118 * A bunch of patches from Kirill Smelkov:
128 * A bunch of patches from Kirill Smelkov:
119
129
120 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
130 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
121
131
122 * [patch 7/9] Implement %page -r (page in raw mode) -
132 * [patch 7/9] Implement %page -r (page in raw mode) -
123
133
124 * [patch 5/9] ScientificPython webpage has moved
134 * [patch 5/9] ScientificPython webpage has moved
125
135
126 * [patch 4/9] The manual mentions %ds, should be %dhist
136 * [patch 4/9] The manual mentions %ds, should be %dhist
127
137
128 * [patch 3/9] Kill old bits from %prun doc.
138 * [patch 3/9] Kill old bits from %prun doc.
129
139
130 * [patch 1/9] Fix typos here and there.
140 * [patch 1/9] Fix typos here and there.
131
141
132 2006-11-08 Ville Vainio <vivainio@gmail.com>
142 2006-11-08 Ville Vainio <vivainio@gmail.com>
133
143
134 * completer.py (attr_matches): catch all exceptions raised
144 * completer.py (attr_matches): catch all exceptions raised
135 by eval of expr with dots.
145 by eval of expr with dots.
136
146
137 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
147 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
138
148
139 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
149 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
140 input if it starts with whitespace. This allows you to paste
150 input if it starts with whitespace. This allows you to paste
141 indented input from any editor without manually having to type in
151 indented input from any editor without manually having to type in
142 the 'if 1:', which is convenient when working interactively.
152 the 'if 1:', which is convenient when working interactively.
143 Slightly modifed version of a patch by Bo Peng
153 Slightly modifed version of a patch by Bo Peng
144 <bpeng-AT-rice.edu>.
154 <bpeng-AT-rice.edu>.
145
155
146 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
156 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
147
157
148 * IPython/irunner.py (main): modified irunner so it automatically
158 * IPython/irunner.py (main): modified irunner so it automatically
149 recognizes the right runner to use based on the extension (.py for
159 recognizes the right runner to use based on the extension (.py for
150 python, .ipy for ipython and .sage for sage).
160 python, .ipy for ipython and .sage for sage).
151
161
152 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
162 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
153 visible in ipapi as ip.config(), to programatically control the
163 visible in ipapi as ip.config(), to programatically control the
154 internal rc object. There's an accompanying %config magic for
164 internal rc object. There's an accompanying %config magic for
155 interactive use, which has been enhanced to match the
165 interactive use, which has been enhanced to match the
156 funtionality in ipconfig.
166 funtionality in ipconfig.
157
167
158 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
168 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
159 so it's not just a toggle, it now takes an argument. Add support
169 so it's not just a toggle, it now takes an argument. Add support
160 for a customizable header when making system calls, as the new
170 for a customizable header when making system calls, as the new
161 system_header variable in the ipythonrc file.
171 system_header variable in the ipythonrc file.
162
172
163 2006-11-03 Walter Doerwald <walter@livinglogic.de>
173 2006-11-03 Walter Doerwald <walter@livinglogic.de>
164
174
165 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
175 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
166 generic functions (using Philip J. Eby's simplegeneric package).
176 generic functions (using Philip J. Eby's simplegeneric package).
167 This makes it possible to customize the display of third-party classes
177 This makes it possible to customize the display of third-party classes
168 without having to monkeypatch them. xiter() no longer supports a mode
178 without having to monkeypatch them. xiter() no longer supports a mode
169 argument and the XMode class has been removed. The same functionality can
179 argument and the XMode class has been removed. The same functionality can
170 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
180 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
171 One consequence of the switch to generic functions is that xrepr() and
181 One consequence of the switch to generic functions is that xrepr() and
172 xattrs() implementation must define the default value for the mode
182 xattrs() implementation must define the default value for the mode
173 argument themselves and xattrs() implementations must return real
183 argument themselves and xattrs() implementations must return real
174 descriptors.
184 descriptors.
175
185
176 * IPython/external: This new subpackage will contain all third-party
186 * IPython/external: This new subpackage will contain all third-party
177 packages that are bundled with IPython. (The first one is simplegeneric).
187 packages that are bundled with IPython. (The first one is simplegeneric).
178
188
179 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
189 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
180 directory which as been dropped in r1703.
190 directory which as been dropped in r1703.
181
191
182 * IPython/Extensions/ipipe.py (iless): Fixed.
192 * IPython/Extensions/ipipe.py (iless): Fixed.
183
193
184 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
194 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
185
195
186 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
196 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
187
197
188 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
198 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
189 handling in variable expansion so that shells and magics recognize
199 handling in variable expansion so that shells and magics recognize
190 function local scopes correctly. Bug reported by Brian.
200 function local scopes correctly. Bug reported by Brian.
191
201
192 * scripts/ipython: remove the very first entry in sys.path which
202 * scripts/ipython: remove the very first entry in sys.path which
193 Python auto-inserts for scripts, so that sys.path under IPython is
203 Python auto-inserts for scripts, so that sys.path under IPython is
194 as similar as possible to that under plain Python.
204 as similar as possible to that under plain Python.
195
205
196 * IPython/completer.py (IPCompleter.file_matches): Fix
206 * IPython/completer.py (IPCompleter.file_matches): Fix
197 tab-completion so that quotes are not closed unless the completion
207 tab-completion so that quotes are not closed unless the completion
198 is unambiguous. After a request by Stefan. Minor cleanups in
208 is unambiguous. After a request by Stefan. Minor cleanups in
199 ipy_stock_completers.
209 ipy_stock_completers.
200
210
201 2006-11-02 Ville Vainio <vivainio@gmail.com>
211 2006-11-02 Ville Vainio <vivainio@gmail.com>
202
212
203 * ipy_stock_completers.py: Add %run and %cd completers.
213 * ipy_stock_completers.py: Add %run and %cd completers.
204
214
205 * completer.py: Try running custom completer for both
215 * completer.py: Try running custom completer for both
206 "foo" and "%foo" if the command is just "foo". Ignore case
216 "foo" and "%foo" if the command is just "foo". Ignore case
207 when filtering possible completions.
217 when filtering possible completions.
208
218
209 * UserConfig/ipy_user_conf.py: install stock completers as default
219 * UserConfig/ipy_user_conf.py: install stock completers as default
210
220
211 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
221 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
212 simplified readline history save / restore through a wrapper
222 simplified readline history save / restore through a wrapper
213 function
223 function
214
224
215
225
216 2006-10-31 Ville Vainio <vivainio@gmail.com>
226 2006-10-31 Ville Vainio <vivainio@gmail.com>
217
227
218 * strdispatch.py, completer.py, ipy_stock_completers.py:
228 * strdispatch.py, completer.py, ipy_stock_completers.py:
219 Allow str_key ("command") in completer hooks. Implement
229 Allow str_key ("command") in completer hooks. Implement
220 trivial completer for 'import' (stdlib modules only). Rename
230 trivial completer for 'import' (stdlib modules only). Rename
221 ipy_linux_package_managers.py to ipy_stock_completers.py.
231 ipy_linux_package_managers.py to ipy_stock_completers.py.
222 SVN completer.
232 SVN completer.
223
233
224 * Extensions/ledit.py: %magic line editor for easily and
234 * Extensions/ledit.py: %magic line editor for easily and
225 incrementally manipulating lists of strings. The magic command
235 incrementally manipulating lists of strings. The magic command
226 name is %led.
236 name is %led.
227
237
228 2006-10-30 Ville Vainio <vivainio@gmail.com>
238 2006-10-30 Ville Vainio <vivainio@gmail.com>
229
239
230 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
240 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
231 Bernsteins's patches for pydb integration.
241 Bernsteins's patches for pydb integration.
232 http://bashdb.sourceforge.net/pydb/
242 http://bashdb.sourceforge.net/pydb/
233
243
234 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
244 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
235 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
245 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
236 custom completer hook to allow the users to implement their own
246 custom completer hook to allow the users to implement their own
237 completers. See ipy_linux_package_managers.py for example. The
247 completers. See ipy_linux_package_managers.py for example. The
238 hook name is 'complete_command'.
248 hook name is 'complete_command'.
239
249
240 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
250 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
241
251
242 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
252 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
243 Numeric leftovers.
253 Numeric leftovers.
244
254
245 * ipython.el (py-execute-region): apply Stefan's patch to fix
255 * ipython.el (py-execute-region): apply Stefan's patch to fix
246 garbled results if the python shell hasn't been previously started.
256 garbled results if the python shell hasn't been previously started.
247
257
248 * IPython/genutils.py (arg_split): moved to genutils, since it's a
258 * IPython/genutils.py (arg_split): moved to genutils, since it's a
249 pretty generic function and useful for other things.
259 pretty generic function and useful for other things.
250
260
251 * IPython/OInspect.py (getsource): Add customizable source
261 * IPython/OInspect.py (getsource): Add customizable source
252 extractor. After a request/patch form W. Stein (SAGE).
262 extractor. After a request/patch form W. Stein (SAGE).
253
263
254 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
264 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
255 window size to a more reasonable value from what pexpect does,
265 window size to a more reasonable value from what pexpect does,
256 since their choice causes wrapping bugs with long input lines.
266 since their choice causes wrapping bugs with long input lines.
257
267
258 2006-10-28 Ville Vainio <vivainio@gmail.com>
268 2006-10-28 Ville Vainio <vivainio@gmail.com>
259
269
260 * Magic.py (%run): Save and restore the readline history from
270 * Magic.py (%run): Save and restore the readline history from
261 file around %run commands to prevent side effects from
271 file around %run commands to prevent side effects from
262 %runned programs that might use readline (e.g. pydb).
272 %runned programs that might use readline (e.g. pydb).
263
273
264 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
274 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
265 invoking the pydb enhanced debugger.
275 invoking the pydb enhanced debugger.
266
276
267 2006-10-23 Walter Doerwald <walter@livinglogic.de>
277 2006-10-23 Walter Doerwald <walter@livinglogic.de>
268
278
269 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
279 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
270 call the base class method and propagate the return value to
280 call the base class method and propagate the return value to
271 ifile. This is now done by path itself.
281 ifile. This is now done by path itself.
272
282
273 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
283 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
274
284
275 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
285 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
276 api: set_crash_handler(), to expose the ability to change the
286 api: set_crash_handler(), to expose the ability to change the
277 internal crash handler.
287 internal crash handler.
278
288
279 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
289 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
280 the various parameters of the crash handler so that apps using
290 the various parameters of the crash handler so that apps using
281 IPython as their engine can customize crash handling. Ipmlemented
291 IPython as their engine can customize crash handling. Ipmlemented
282 at the request of SAGE.
292 at the request of SAGE.
283
293
284 2006-10-14 Ville Vainio <vivainio@gmail.com>
294 2006-10-14 Ville Vainio <vivainio@gmail.com>
285
295
286 * Magic.py, ipython.el: applied first "safe" part of Rocky
296 * Magic.py, ipython.el: applied first "safe" part of Rocky
287 Bernstein's patch set for pydb integration.
297 Bernstein's patch set for pydb integration.
288
298
289 * Magic.py (%unalias, %alias): %store'd aliases can now be
299 * Magic.py (%unalias, %alias): %store'd aliases can now be
290 removed with '%unalias'. %alias w/o args now shows most
300 removed with '%unalias'. %alias w/o args now shows most
291 interesting (stored / manually defined) aliases last
301 interesting (stored / manually defined) aliases last
292 where they catch the eye w/o scrolling.
302 where they catch the eye w/o scrolling.
293
303
294 * Magic.py (%rehashx), ext_rehashdir.py: files with
304 * Magic.py (%rehashx), ext_rehashdir.py: files with
295 'py' extension are always considered executable, even
305 'py' extension are always considered executable, even
296 when not in PATHEXT environment variable.
306 when not in PATHEXT environment variable.
297
307
298 2006-10-12 Ville Vainio <vivainio@gmail.com>
308 2006-10-12 Ville Vainio <vivainio@gmail.com>
299
309
300 * jobctrl.py: Add new "jobctrl" extension for spawning background
310 * jobctrl.py: Add new "jobctrl" extension for spawning background
301 processes with "&find /". 'import jobctrl' to try it out. Requires
311 processes with "&find /". 'import jobctrl' to try it out. Requires
302 'subprocess' module, standard in python 2.4+.
312 'subprocess' module, standard in python 2.4+.
303
313
304 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
314 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
305 so if foo -> bar and bar -> baz, then foo -> baz.
315 so if foo -> bar and bar -> baz, then foo -> baz.
306
316
307 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
317 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
308
318
309 * IPython/Magic.py (Magic.parse_options): add a new posix option
319 * IPython/Magic.py (Magic.parse_options): add a new posix option
310 to allow parsing of input args in magics that doesn't strip quotes
320 to allow parsing of input args in magics that doesn't strip quotes
311 (if posix=False). This also closes %timeit bug reported by
321 (if posix=False). This also closes %timeit bug reported by
312 Stefan.
322 Stefan.
313
323
314 2006-10-03 Ville Vainio <vivainio@gmail.com>
324 2006-10-03 Ville Vainio <vivainio@gmail.com>
315
325
316 * iplib.py (raw_input, interact): Return ValueError catching for
326 * iplib.py (raw_input, interact): Return ValueError catching for
317 raw_input. Fixes infinite loop for sys.stdin.close() or
327 raw_input. Fixes infinite loop for sys.stdin.close() or
318 sys.stdout.close().
328 sys.stdout.close().
319
329
320 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
330 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
321
331
322 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
332 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
323 to help in handling doctests. irunner is now pretty useful for
333 to help in handling doctests. irunner is now pretty useful for
324 running standalone scripts and simulate a full interactive session
334 running standalone scripts and simulate a full interactive session
325 in a format that can be then pasted as a doctest.
335 in a format that can be then pasted as a doctest.
326
336
327 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
337 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
328 on top of the default (useless) ones. This also fixes the nasty
338 on top of the default (useless) ones. This also fixes the nasty
329 way in which 2.5's Quitter() exits (reverted [1785]).
339 way in which 2.5's Quitter() exits (reverted [1785]).
330
340
331 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
341 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
332 2.5.
342 2.5.
333
343
334 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
344 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
335 color scheme is updated as well when color scheme is changed
345 color scheme is updated as well when color scheme is changed
336 interactively.
346 interactively.
337
347
338 2006-09-27 Ville Vainio <vivainio@gmail.com>
348 2006-09-27 Ville Vainio <vivainio@gmail.com>
339
349
340 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
350 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
341 infinite loop and just exit. It's a hack, but will do for a while.
351 infinite loop and just exit. It's a hack, but will do for a while.
342
352
343 2006-08-25 Walter Doerwald <walter@livinglogic.de>
353 2006-08-25 Walter Doerwald <walter@livinglogic.de>
344
354
345 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
355 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
346 the constructor, this makes it possible to get a list of only directories
356 the constructor, this makes it possible to get a list of only directories
347 or only files.
357 or only files.
348
358
349 2006-08-12 Ville Vainio <vivainio@gmail.com>
359 2006-08-12 Ville Vainio <vivainio@gmail.com>
350
360
351 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
361 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
352 they broke unittest
362 they broke unittest
353
363
354 2006-08-11 Ville Vainio <vivainio@gmail.com>
364 2006-08-11 Ville Vainio <vivainio@gmail.com>
355
365
356 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
366 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
357 by resolving issue properly, i.e. by inheriting FakeModule
367 by resolving issue properly, i.e. by inheriting FakeModule
358 from types.ModuleType. Pickling ipython interactive data
368 from types.ModuleType. Pickling ipython interactive data
359 should still work as usual (testing appreciated).
369 should still work as usual (testing appreciated).
360
370
361 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
371 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
362
372
363 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
373 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
364 running under python 2.3 with code from 2.4 to fix a bug with
374 running under python 2.3 with code from 2.4 to fix a bug with
365 help(). Reported by the Debian maintainers, Norbert Tretkowski
375 help(). Reported by the Debian maintainers, Norbert Tretkowski
366 <norbert-AT-tretkowski.de> and Alexandre Fayolle
376 <norbert-AT-tretkowski.de> and Alexandre Fayolle
367 <afayolle-AT-debian.org>.
377 <afayolle-AT-debian.org>.
368
378
369 2006-08-04 Walter Doerwald <walter@livinglogic.de>
379 2006-08-04 Walter Doerwald <walter@livinglogic.de>
370
380
371 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
381 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
372 (which was displaying "quit" twice).
382 (which was displaying "quit" twice).
373
383
374 2006-07-28 Walter Doerwald <walter@livinglogic.de>
384 2006-07-28 Walter Doerwald <walter@livinglogic.de>
375
385
376 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
386 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
377 the mode argument).
387 the mode argument).
378
388
379 2006-07-27 Walter Doerwald <walter@livinglogic.de>
389 2006-07-27 Walter Doerwald <walter@livinglogic.de>
380
390
381 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
391 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
382 not running under IPython.
392 not running under IPython.
383
393
384 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
394 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
385 and make it iterable (iterating over the attribute itself). Add two new
395 and make it iterable (iterating over the attribute itself). Add two new
386 magic strings for __xattrs__(): If the string starts with "-", the attribute
396 magic strings for __xattrs__(): If the string starts with "-", the attribute
387 will not be displayed in ibrowse's detail view (but it can still be
397 will not be displayed in ibrowse's detail view (but it can still be
388 iterated over). This makes it possible to add attributes that are large
398 iterated over). This makes it possible to add attributes that are large
389 lists or generator methods to the detail view. Replace magic attribute names
399 lists or generator methods to the detail view. Replace magic attribute names
390 and _attrname() and _getattr() with "descriptors": For each type of magic
400 and _attrname() and _getattr() with "descriptors": For each type of magic
391 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
401 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
392 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
402 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
393 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
403 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
394 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
404 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
395 are still supported.
405 are still supported.
396
406
397 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
407 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
398 fails in ibrowse.fetch(), the exception object is added as the last item
408 fails in ibrowse.fetch(), the exception object is added as the last item
399 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
409 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
400 a generator throws an exception midway through execution.
410 a generator throws an exception midway through execution.
401
411
402 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
412 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
403 encoding into methods.
413 encoding into methods.
404
414
405 2006-07-26 Ville Vainio <vivainio@gmail.com>
415 2006-07-26 Ville Vainio <vivainio@gmail.com>
406
416
407 * iplib.py: history now stores multiline input as single
417 * iplib.py: history now stores multiline input as single
408 history entries. Patch by Jorgen Cederlof.
418 history entries. Patch by Jorgen Cederlof.
409
419
410 2006-07-18 Walter Doerwald <walter@livinglogic.de>
420 2006-07-18 Walter Doerwald <walter@livinglogic.de>
411
421
412 * IPython/Extensions/ibrowse.py: Make cursor visible over
422 * IPython/Extensions/ibrowse.py: Make cursor visible over
413 non existing attributes.
423 non existing attributes.
414
424
415 2006-07-14 Walter Doerwald <walter@livinglogic.de>
425 2006-07-14 Walter Doerwald <walter@livinglogic.de>
416
426
417 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
427 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
418 error output of the running command doesn't mess up the screen.
428 error output of the running command doesn't mess up the screen.
419
429
420 2006-07-13 Walter Doerwald <walter@livinglogic.de>
430 2006-07-13 Walter Doerwald <walter@livinglogic.de>
421
431
422 * IPython/Extensions/ipipe.py (isort): Make isort usable without
432 * IPython/Extensions/ipipe.py (isort): Make isort usable without
423 argument. This sorts the items themselves.
433 argument. This sorts the items themselves.
424
434
425 2006-07-12 Walter Doerwald <walter@livinglogic.de>
435 2006-07-12 Walter Doerwald <walter@livinglogic.de>
426
436
427 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
437 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
428 Compile expression strings into code objects. This should speed
438 Compile expression strings into code objects. This should speed
429 up ifilter and friends somewhat.
439 up ifilter and friends somewhat.
430
440
431 2006-07-08 Ville Vainio <vivainio@gmail.com>
441 2006-07-08 Ville Vainio <vivainio@gmail.com>
432
442
433 * Magic.py: %cpaste now strips > from the beginning of lines
443 * Magic.py: %cpaste now strips > from the beginning of lines
434 to ease pasting quoted code from emails. Contributed by
444 to ease pasting quoted code from emails. Contributed by
435 Stefan van der Walt.
445 Stefan van der Walt.
436
446
437 2006-06-29 Ville Vainio <vivainio@gmail.com>
447 2006-06-29 Ville Vainio <vivainio@gmail.com>
438
448
439 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
449 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
440 mode, patch contributed by Darren Dale. NEEDS TESTING!
450 mode, patch contributed by Darren Dale. NEEDS TESTING!
441
451
442 2006-06-28 Walter Doerwald <walter@livinglogic.de>
452 2006-06-28 Walter Doerwald <walter@livinglogic.de>
443
453
444 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
454 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
445 a blue background. Fix fetching new display rows when the browser
455 a blue background. Fix fetching new display rows when the browser
446 scrolls more than a screenful (e.g. by using the goto command).
456 scrolls more than a screenful (e.g. by using the goto command).
447
457
448 2006-06-27 Ville Vainio <vivainio@gmail.com>
458 2006-06-27 Ville Vainio <vivainio@gmail.com>
449
459
450 * Magic.py (_inspect, _ofind) Apply David Huard's
460 * Magic.py (_inspect, _ofind) Apply David Huard's
451 patch for displaying the correct docstring for 'property'
461 patch for displaying the correct docstring for 'property'
452 attributes.
462 attributes.
453
463
454 2006-06-23 Walter Doerwald <walter@livinglogic.de>
464 2006-06-23 Walter Doerwald <walter@livinglogic.de>
455
465
456 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
466 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
457 commands into the methods implementing them.
467 commands into the methods implementing them.
458
468
459 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
469 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
460
470
461 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
471 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
462 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
472 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
463 autoindent support was authored by Jin Liu.
473 autoindent support was authored by Jin Liu.
464
474
465 2006-06-22 Walter Doerwald <walter@livinglogic.de>
475 2006-06-22 Walter Doerwald <walter@livinglogic.de>
466
476
467 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
477 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
468 for keymaps with a custom class that simplifies handling.
478 for keymaps with a custom class that simplifies handling.
469
479
470 2006-06-19 Walter Doerwald <walter@livinglogic.de>
480 2006-06-19 Walter Doerwald <walter@livinglogic.de>
471
481
472 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
482 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
473 resizing. This requires Python 2.5 to work.
483 resizing. This requires Python 2.5 to work.
474
484
475 2006-06-16 Walter Doerwald <walter@livinglogic.de>
485 2006-06-16 Walter Doerwald <walter@livinglogic.de>
476
486
477 * IPython/Extensions/ibrowse.py: Add two new commands to
487 * IPython/Extensions/ibrowse.py: Add two new commands to
478 ibrowse: "hideattr" (mapped to "h") hides the attribute under
488 ibrowse: "hideattr" (mapped to "h") hides the attribute under
479 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
489 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
480 attributes again. Remapped the help command to "?". Display
490 attributes again. Remapped the help command to "?". Display
481 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
491 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
482 as keys for the "home" and "end" commands. Add three new commands
492 as keys for the "home" and "end" commands. Add three new commands
483 to the input mode for "find" and friends: "delend" (CTRL-K)
493 to the input mode for "find" and friends: "delend" (CTRL-K)
484 deletes to the end of line. "incsearchup" searches upwards in the
494 deletes to the end of line. "incsearchup" searches upwards in the
485 command history for an input that starts with the text before the cursor.
495 command history for an input that starts with the text before the cursor.
486 "incsearchdown" does the same downwards. Removed a bogus mapping of
496 "incsearchdown" does the same downwards. Removed a bogus mapping of
487 the x key to "delete".
497 the x key to "delete".
488
498
489 2006-06-15 Ville Vainio <vivainio@gmail.com>
499 2006-06-15 Ville Vainio <vivainio@gmail.com>
490
500
491 * iplib.py, hooks.py: Added new generate_prompt hook that can be
501 * iplib.py, hooks.py: Added new generate_prompt hook that can be
492 used to create prompts dynamically, instead of the "old" way of
502 used to create prompts dynamically, instead of the "old" way of
493 assigning "magic" strings to prompt_in1 and prompt_in2. The old
503 assigning "magic" strings to prompt_in1 and prompt_in2. The old
494 way still works (it's invoked by the default hook), of course.
504 way still works (it's invoked by the default hook), of course.
495
505
496 * Prompts.py: added generate_output_prompt hook for altering output
506 * Prompts.py: added generate_output_prompt hook for altering output
497 prompt
507 prompt
498
508
499 * Release.py: Changed version string to 0.7.3.svn.
509 * Release.py: Changed version string to 0.7.3.svn.
500
510
501 2006-06-15 Walter Doerwald <walter@livinglogic.de>
511 2006-06-15 Walter Doerwald <walter@livinglogic.de>
502
512
503 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
513 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
504 the call to fetch() always tries to fetch enough data for at least one
514 the call to fetch() always tries to fetch enough data for at least one
505 full screen. This makes it possible to simply call moveto(0,0,True) in
515 full screen. This makes it possible to simply call moveto(0,0,True) in
506 the constructor. Fix typos and removed the obsolete goto attribute.
516 the constructor. Fix typos and removed the obsolete goto attribute.
507
517
508 2006-06-12 Ville Vainio <vivainio@gmail.com>
518 2006-06-12 Ville Vainio <vivainio@gmail.com>
509
519
510 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
520 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
511 allowing $variable interpolation within multiline statements,
521 allowing $variable interpolation within multiline statements,
512 though so far only with "sh" profile for a testing period.
522 though so far only with "sh" profile for a testing period.
513 The patch also enables splitting long commands with \ but it
523 The patch also enables splitting long commands with \ but it
514 doesn't work properly yet.
524 doesn't work properly yet.
515
525
516 2006-06-12 Walter Doerwald <walter@livinglogic.de>
526 2006-06-12 Walter Doerwald <walter@livinglogic.de>
517
527
518 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
528 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
519 input history and the position of the cursor in the input history for
529 input history and the position of the cursor in the input history for
520 the find, findbackwards and goto command.
530 the find, findbackwards and goto command.
521
531
522 2006-06-10 Walter Doerwald <walter@livinglogic.de>
532 2006-06-10 Walter Doerwald <walter@livinglogic.de>
523
533
524 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
534 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
525 implements the basic functionality of browser commands that require
535 implements the basic functionality of browser commands that require
526 input. Reimplement the goto, find and findbackwards commands as
536 input. Reimplement the goto, find and findbackwards commands as
527 subclasses of _CommandInput. Add an input history and keymaps to those
537 subclasses of _CommandInput. Add an input history and keymaps to those
528 commands. Add "\r" as a keyboard shortcut for the enterdefault and
538 commands. Add "\r" as a keyboard shortcut for the enterdefault and
529 execute commands.
539 execute commands.
530
540
531 2006-06-07 Ville Vainio <vivainio@gmail.com>
541 2006-06-07 Ville Vainio <vivainio@gmail.com>
532
542
533 * iplib.py: ipython mybatch.ipy exits ipython immediately after
543 * iplib.py: ipython mybatch.ipy exits ipython immediately after
534 running the batch files instead of leaving the session open.
544 running the batch files instead of leaving the session open.
535
545
536 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
546 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
537
547
538 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
548 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
539 the original fix was incomplete. Patch submitted by W. Maier.
549 the original fix was incomplete. Patch submitted by W. Maier.
540
550
541 2006-06-07 Ville Vainio <vivainio@gmail.com>
551 2006-06-07 Ville Vainio <vivainio@gmail.com>
542
552
543 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
553 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
544 Confirmation prompts can be supressed by 'quiet' option.
554 Confirmation prompts can be supressed by 'quiet' option.
545 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
555 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
546
556
547 2006-06-06 *** Released version 0.7.2
557 2006-06-06 *** Released version 0.7.2
548
558
549 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
559 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
550
560
551 * IPython/Release.py (version): Made 0.7.2 final for release.
561 * IPython/Release.py (version): Made 0.7.2 final for release.
552 Repo tagged and release cut.
562 Repo tagged and release cut.
553
563
554 2006-06-05 Ville Vainio <vivainio@gmail.com>
564 2006-06-05 Ville Vainio <vivainio@gmail.com>
555
565
556 * Magic.py (magic_rehashx): Honor no_alias list earlier in
566 * Magic.py (magic_rehashx): Honor no_alias list earlier in
557 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
567 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
558
568
559 * upgrade_dir.py: try import 'path' module a bit harder
569 * upgrade_dir.py: try import 'path' module a bit harder
560 (for %upgrade)
570 (for %upgrade)
561
571
562 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
572 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
563
573
564 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
574 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
565 instead of looping 20 times.
575 instead of looping 20 times.
566
576
567 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
577 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
568 correctly at initialization time. Bug reported by Krishna Mohan
578 correctly at initialization time. Bug reported by Krishna Mohan
569 Gundu <gkmohan-AT-gmail.com> on the user list.
579 Gundu <gkmohan-AT-gmail.com> on the user list.
570
580
571 * IPython/Release.py (version): Mark 0.7.2 version to start
581 * IPython/Release.py (version): Mark 0.7.2 version to start
572 testing for release on 06/06.
582 testing for release on 06/06.
573
583
574 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
584 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
575
585
576 * scripts/irunner: thin script interface so users don't have to
586 * scripts/irunner: thin script interface so users don't have to
577 find the module and call it as an executable, since modules rarely
587 find the module and call it as an executable, since modules rarely
578 live in people's PATH.
588 live in people's PATH.
579
589
580 * IPython/irunner.py (InteractiveRunner.__init__): added
590 * IPython/irunner.py (InteractiveRunner.__init__): added
581 delaybeforesend attribute to control delays with newer versions of
591 delaybeforesend attribute to control delays with newer versions of
582 pexpect. Thanks to detailed help from pexpect's author, Noah
592 pexpect. Thanks to detailed help from pexpect's author, Noah
583 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
593 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
584 correctly (it works in NoColor mode).
594 correctly (it works in NoColor mode).
585
595
586 * IPython/iplib.py (handle_normal): fix nasty crash reported on
596 * IPython/iplib.py (handle_normal): fix nasty crash reported on
587 SAGE list, from improper log() calls.
597 SAGE list, from improper log() calls.
588
598
589 2006-05-31 Ville Vainio <vivainio@gmail.com>
599 2006-05-31 Ville Vainio <vivainio@gmail.com>
590
600
591 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
601 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
592 with args in parens to work correctly with dirs that have spaces.
602 with args in parens to work correctly with dirs that have spaces.
593
603
594 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
604 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
595
605
596 * IPython/Logger.py (Logger.logstart): add option to log raw input
606 * IPython/Logger.py (Logger.logstart): add option to log raw input
597 instead of the processed one. A -r flag was added to the
607 instead of the processed one. A -r flag was added to the
598 %logstart magic used for controlling logging.
608 %logstart magic used for controlling logging.
599
609
600 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
610 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
601
611
602 * IPython/iplib.py (InteractiveShell.__init__): add check for the
612 * IPython/iplib.py (InteractiveShell.__init__): add check for the
603 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
613 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
604 recognize the option. After a bug report by Will Maier. This
614 recognize the option. After a bug report by Will Maier. This
605 closes #64 (will do it after confirmation from W. Maier).
615 closes #64 (will do it after confirmation from W. Maier).
606
616
607 * IPython/irunner.py: New module to run scripts as if manually
617 * IPython/irunner.py: New module to run scripts as if manually
608 typed into an interactive environment, based on pexpect. After a
618 typed into an interactive environment, based on pexpect. After a
609 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
619 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
610 ipython-user list. Simple unittests in the tests/ directory.
620 ipython-user list. Simple unittests in the tests/ directory.
611
621
612 * tools/release: add Will Maier, OpenBSD port maintainer, to
622 * tools/release: add Will Maier, OpenBSD port maintainer, to
613 recepients list. We are now officially part of the OpenBSD ports:
623 recepients list. We are now officially part of the OpenBSD ports:
614 http://www.openbsd.org/ports.html ! Many thanks to Will for the
624 http://www.openbsd.org/ports.html ! Many thanks to Will for the
615 work.
625 work.
616
626
617 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
627 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
618
628
619 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
629 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
620 so that it doesn't break tkinter apps.
630 so that it doesn't break tkinter apps.
621
631
622 * IPython/iplib.py (_prefilter): fix bug where aliases would
632 * IPython/iplib.py (_prefilter): fix bug where aliases would
623 shadow variables when autocall was fully off. Reported by SAGE
633 shadow variables when autocall was fully off. Reported by SAGE
624 author William Stein.
634 author William Stein.
625
635
626 * IPython/OInspect.py (Inspector.__init__): add a flag to control
636 * IPython/OInspect.py (Inspector.__init__): add a flag to control
627 at what detail level strings are computed when foo? is requested.
637 at what detail level strings are computed when foo? is requested.
628 This allows users to ask for example that the string form of an
638 This allows users to ask for example that the string form of an
629 object is only computed when foo?? is called, or even never, by
639 object is only computed when foo?? is called, or even never, by
630 setting the object_info_string_level >= 2 in the configuration
640 setting the object_info_string_level >= 2 in the configuration
631 file. This new option has been added and documented. After a
641 file. This new option has been added and documented. After a
632 request by SAGE to be able to control the printing of very large
642 request by SAGE to be able to control the printing of very large
633 objects more easily.
643 objects more easily.
634
644
635 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
645 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
636
646
637 * IPython/ipmaker.py (make_IPython): remove the ipython call path
647 * IPython/ipmaker.py (make_IPython): remove the ipython call path
638 from sys.argv, to be 100% consistent with how Python itself works
648 from sys.argv, to be 100% consistent with how Python itself works
639 (as seen for example with python -i file.py). After a bug report
649 (as seen for example with python -i file.py). After a bug report
640 by Jeffrey Collins.
650 by Jeffrey Collins.
641
651
642 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
652 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
643 nasty bug which was preventing custom namespaces with -pylab,
653 nasty bug which was preventing custom namespaces with -pylab,
644 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
654 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
645 compatibility (long gone from mpl).
655 compatibility (long gone from mpl).
646
656
647 * IPython/ipapi.py (make_session): name change: create->make. We
657 * IPython/ipapi.py (make_session): name change: create->make. We
648 use make in other places (ipmaker,...), it's shorter and easier to
658 use make in other places (ipmaker,...), it's shorter and easier to
649 type and say, etc. I'm trying to clean things before 0.7.2 so
659 type and say, etc. I'm trying to clean things before 0.7.2 so
650 that I can keep things stable wrt to ipapi in the chainsaw branch.
660 that I can keep things stable wrt to ipapi in the chainsaw branch.
651
661
652 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
662 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
653 python-mode recognizes our debugger mode. Add support for
663 python-mode recognizes our debugger mode. Add support for
654 autoindent inside (X)emacs. After a patch sent in by Jin Liu
664 autoindent inside (X)emacs. After a patch sent in by Jin Liu
655 <m.liu.jin-AT-gmail.com> originally written by
665 <m.liu.jin-AT-gmail.com> originally written by
656 doxgen-AT-newsmth.net (with minor modifications for xemacs
666 doxgen-AT-newsmth.net (with minor modifications for xemacs
657 compatibility)
667 compatibility)
658
668
659 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
669 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
660 tracebacks when walking the stack so that the stack tracking system
670 tracebacks when walking the stack so that the stack tracking system
661 in emacs' python-mode can identify the frames correctly.
671 in emacs' python-mode can identify the frames correctly.
662
672
663 * IPython/ipmaker.py (make_IPython): make the internal (and
673 * IPython/ipmaker.py (make_IPython): make the internal (and
664 default config) autoedit_syntax value false by default. Too many
674 default config) autoedit_syntax value false by default. Too many
665 users have complained to me (both on and off-list) about problems
675 users have complained to me (both on and off-list) about problems
666 with this option being on by default, so I'm making it default to
676 with this option being on by default, so I'm making it default to
667 off. It can still be enabled by anyone via the usual mechanisms.
677 off. It can still be enabled by anyone via the usual mechanisms.
668
678
669 * IPython/completer.py (Completer.attr_matches): add support for
679 * IPython/completer.py (Completer.attr_matches): add support for
670 PyCrust-style _getAttributeNames magic method. Patch contributed
680 PyCrust-style _getAttributeNames magic method. Patch contributed
671 by <mscott-AT-goldenspud.com>. Closes #50.
681 by <mscott-AT-goldenspud.com>. Closes #50.
672
682
673 * IPython/iplib.py (InteractiveShell.__init__): remove the
683 * IPython/iplib.py (InteractiveShell.__init__): remove the
674 deletion of exit/quit from __builtin__, which can break
684 deletion of exit/quit from __builtin__, which can break
675 third-party tools like the Zope debugging console. The
685 third-party tools like the Zope debugging console. The
676 %exit/%quit magics remain. In general, it's probably a good idea
686 %exit/%quit magics remain. In general, it's probably a good idea
677 not to delete anything from __builtin__, since we never know what
687 not to delete anything from __builtin__, since we never know what
678 that will break. In any case, python now (for 2.5) will support
688 that will break. In any case, python now (for 2.5) will support
679 'real' exit/quit, so this issue is moot. Closes #55.
689 'real' exit/quit, so this issue is moot. Closes #55.
680
690
681 * IPython/genutils.py (with_obj): rename the 'with' function to
691 * IPython/genutils.py (with_obj): rename the 'with' function to
682 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
692 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
683 becomes a language keyword. Closes #53.
693 becomes a language keyword. Closes #53.
684
694
685 * IPython/FakeModule.py (FakeModule.__init__): add a proper
695 * IPython/FakeModule.py (FakeModule.__init__): add a proper
686 __file__ attribute to this so it fools more things into thinking
696 __file__ attribute to this so it fools more things into thinking
687 it is a real module. Closes #59.
697 it is a real module. Closes #59.
688
698
689 * IPython/Magic.py (magic_edit): add -n option to open the editor
699 * IPython/Magic.py (magic_edit): add -n option to open the editor
690 at a specific line number. After a patch by Stefan van der Walt.
700 at a specific line number. After a patch by Stefan van der Walt.
691
701
692 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
702 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
693
703
694 * IPython/iplib.py (edit_syntax_error): fix crash when for some
704 * IPython/iplib.py (edit_syntax_error): fix crash when for some
695 reason the file could not be opened. After automatic crash
705 reason the file could not be opened. After automatic crash
696 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
706 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
697 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
707 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
698 (_should_recompile): Don't fire editor if using %bg, since there
708 (_should_recompile): Don't fire editor if using %bg, since there
699 is no file in the first place. From the same report as above.
709 is no file in the first place. From the same report as above.
700 (raw_input): protect against faulty third-party prefilters. After
710 (raw_input): protect against faulty third-party prefilters. After
701 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
711 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
702 while running under SAGE.
712 while running under SAGE.
703
713
704 2006-05-23 Ville Vainio <vivainio@gmail.com>
714 2006-05-23 Ville Vainio <vivainio@gmail.com>
705
715
706 * ipapi.py: Stripped down ip.to_user_ns() to work only as
716 * ipapi.py: Stripped down ip.to_user_ns() to work only as
707 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
717 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
708 now returns None (again), unless dummy is specifically allowed by
718 now returns None (again), unless dummy is specifically allowed by
709 ipapi.get(allow_dummy=True).
719 ipapi.get(allow_dummy=True).
710
720
711 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
721 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
712
722
713 * IPython: remove all 2.2-compatibility objects and hacks from
723 * IPython: remove all 2.2-compatibility objects and hacks from
714 everywhere, since we only support 2.3 at this point. Docs
724 everywhere, since we only support 2.3 at this point. Docs
715 updated.
725 updated.
716
726
717 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
727 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
718 Anything requiring extra validation can be turned into a Python
728 Anything requiring extra validation can be turned into a Python
719 property in the future. I used a property for the db one b/c
729 property in the future. I used a property for the db one b/c
720 there was a nasty circularity problem with the initialization
730 there was a nasty circularity problem with the initialization
721 order, which right now I don't have time to clean up.
731 order, which right now I don't have time to clean up.
722
732
723 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
733 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
724 another locking bug reported by Jorgen. I'm not 100% sure though,
734 another locking bug reported by Jorgen. I'm not 100% sure though,
725 so more testing is needed...
735 so more testing is needed...
726
736
727 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
737 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
728
738
729 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
739 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
730 local variables from any routine in user code (typically executed
740 local variables from any routine in user code (typically executed
731 with %run) directly into the interactive namespace. Very useful
741 with %run) directly into the interactive namespace. Very useful
732 when doing complex debugging.
742 when doing complex debugging.
733 (IPythonNotRunning): Changed the default None object to a dummy
743 (IPythonNotRunning): Changed the default None object to a dummy
734 whose attributes can be queried as well as called without
744 whose attributes can be queried as well as called without
735 exploding, to ease writing code which works transparently both in
745 exploding, to ease writing code which works transparently both in
736 and out of ipython and uses some of this API.
746 and out of ipython and uses some of this API.
737
747
738 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
748 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
739
749
740 * IPython/hooks.py (result_display): Fix the fact that our display
750 * IPython/hooks.py (result_display): Fix the fact that our display
741 hook was using str() instead of repr(), as the default python
751 hook was using str() instead of repr(), as the default python
742 console does. This had gone unnoticed b/c it only happened if
752 console does. This had gone unnoticed b/c it only happened if
743 %Pprint was off, but the inconsistency was there.
753 %Pprint was off, but the inconsistency was there.
744
754
745 2006-05-15 Ville Vainio <vivainio@gmail.com>
755 2006-05-15 Ville Vainio <vivainio@gmail.com>
746
756
747 * Oinspect.py: Only show docstring for nonexisting/binary files
757 * Oinspect.py: Only show docstring for nonexisting/binary files
748 when doing object??, closing ticket #62
758 when doing object??, closing ticket #62
749
759
750 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
760 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
751
761
752 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
762 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
753 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
763 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
754 was being released in a routine which hadn't checked if it had
764 was being released in a routine which hadn't checked if it had
755 been the one to acquire it.
765 been the one to acquire it.
756
766
757 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
767 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
758
768
759 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
769 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
760
770
761 2006-04-11 Ville Vainio <vivainio@gmail.com>
771 2006-04-11 Ville Vainio <vivainio@gmail.com>
762
772
763 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
773 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
764 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
774 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
765 prefilters, allowing stuff like magics and aliases in the file.
775 prefilters, allowing stuff like magics and aliases in the file.
766
776
767 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
777 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
768 added. Supported now are "%clear in" and "%clear out" (clear input and
778 added. Supported now are "%clear in" and "%clear out" (clear input and
769 output history, respectively). Also fixed CachedOutput.flush to
779 output history, respectively). Also fixed CachedOutput.flush to
770 properly flush the output cache.
780 properly flush the output cache.
771
781
772 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
782 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
773 half-success (and fail explicitly).
783 half-success (and fail explicitly).
774
784
775 2006-03-28 Ville Vainio <vivainio@gmail.com>
785 2006-03-28 Ville Vainio <vivainio@gmail.com>
776
786
777 * iplib.py: Fix quoting of aliases so that only argless ones
787 * iplib.py: Fix quoting of aliases so that only argless ones
778 are quoted
788 are quoted
779
789
780 2006-03-28 Ville Vainio <vivainio@gmail.com>
790 2006-03-28 Ville Vainio <vivainio@gmail.com>
781
791
782 * iplib.py: Quote aliases with spaces in the name.
792 * iplib.py: Quote aliases with spaces in the name.
783 "c:\program files\blah\bin" is now legal alias target.
793 "c:\program files\blah\bin" is now legal alias target.
784
794
785 * ext_rehashdir.py: Space no longer allowed as arg
795 * ext_rehashdir.py: Space no longer allowed as arg
786 separator, since space is legal in path names.
796 separator, since space is legal in path names.
787
797
788 2006-03-16 Ville Vainio <vivainio@gmail.com>
798 2006-03-16 Ville Vainio <vivainio@gmail.com>
789
799
790 * upgrade_dir.py: Take path.py from Extensions, correcting
800 * upgrade_dir.py: Take path.py from Extensions, correcting
791 %upgrade magic
801 %upgrade magic
792
802
793 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
803 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
794
804
795 * hooks.py: Only enclose editor binary in quotes if legal and
805 * hooks.py: Only enclose editor binary in quotes if legal and
796 necessary (space in the name, and is an existing file). Fixes a bug
806 necessary (space in the name, and is an existing file). Fixes a bug
797 reported by Zachary Pincus.
807 reported by Zachary Pincus.
798
808
799 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
809 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
800
810
801 * Manual: thanks to a tip on proper color handling for Emacs, by
811 * Manual: thanks to a tip on proper color handling for Emacs, by
802 Eric J Haywiser <ejh1-AT-MIT.EDU>.
812 Eric J Haywiser <ejh1-AT-MIT.EDU>.
803
813
804 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
814 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
805 by applying the provided patch. Thanks to Liu Jin
815 by applying the provided patch. Thanks to Liu Jin
806 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
816 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
807 XEmacs/Linux, I'm trusting the submitter that it actually helps
817 XEmacs/Linux, I'm trusting the submitter that it actually helps
808 under win32/GNU Emacs. Will revisit if any problems are reported.
818 under win32/GNU Emacs. Will revisit if any problems are reported.
809
819
810 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
820 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
811
821
812 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
822 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
813 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
823 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
814
824
815 2006-03-12 Ville Vainio <vivainio@gmail.com>
825 2006-03-12 Ville Vainio <vivainio@gmail.com>
816
826
817 * Magic.py (magic_timeit): Added %timeit magic, contributed by
827 * Magic.py (magic_timeit): Added %timeit magic, contributed by
818 Torsten Marek.
828 Torsten Marek.
819
829
820 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
830 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
821
831
822 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
832 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
823 line ranges works again.
833 line ranges works again.
824
834
825 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
835 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
826
836
827 * IPython/iplib.py (showtraceback): add back sys.last_traceback
837 * IPython/iplib.py (showtraceback): add back sys.last_traceback
828 and friends, after a discussion with Zach Pincus on ipython-user.
838 and friends, after a discussion with Zach Pincus on ipython-user.
829 I'm not 100% sure, but after thinking about it quite a bit, it may
839 I'm not 100% sure, but after thinking about it quite a bit, it may
830 be OK. Testing with the multithreaded shells didn't reveal any
840 be OK. Testing with the multithreaded shells didn't reveal any
831 problems, but let's keep an eye out.
841 problems, but let's keep an eye out.
832
842
833 In the process, I fixed a few things which were calling
843 In the process, I fixed a few things which were calling
834 self.InteractiveTB() directly (like safe_execfile), which is a
844 self.InteractiveTB() directly (like safe_execfile), which is a
835 mistake: ALL exception reporting should be done by calling
845 mistake: ALL exception reporting should be done by calling
836 self.showtraceback(), which handles state and tab-completion and
846 self.showtraceback(), which handles state and tab-completion and
837 more.
847 more.
838
848
839 2006-03-01 Ville Vainio <vivainio@gmail.com>
849 2006-03-01 Ville Vainio <vivainio@gmail.com>
840
850
841 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
851 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
842 To use, do "from ipipe import *".
852 To use, do "from ipipe import *".
843
853
844 2006-02-24 Ville Vainio <vivainio@gmail.com>
854 2006-02-24 Ville Vainio <vivainio@gmail.com>
845
855
846 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
856 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
847 "cleanly" and safely than the older upgrade mechanism.
857 "cleanly" and safely than the older upgrade mechanism.
848
858
849 2006-02-21 Ville Vainio <vivainio@gmail.com>
859 2006-02-21 Ville Vainio <vivainio@gmail.com>
850
860
851 * Magic.py: %save works again.
861 * Magic.py: %save works again.
852
862
853 2006-02-15 Ville Vainio <vivainio@gmail.com>
863 2006-02-15 Ville Vainio <vivainio@gmail.com>
854
864
855 * Magic.py: %Pprint works again
865 * Magic.py: %Pprint works again
856
866
857 * Extensions/ipy_sane_defaults.py: Provide everything provided
867 * Extensions/ipy_sane_defaults.py: Provide everything provided
858 in default ipythonrc, to make it possible to have a completely empty
868 in default ipythonrc, to make it possible to have a completely empty
859 ipythonrc (and thus completely rc-file free configuration)
869 ipythonrc (and thus completely rc-file free configuration)
860
870
861 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
871 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
862
872
863 * IPython/hooks.py (editor): quote the call to the editor command,
873 * IPython/hooks.py (editor): quote the call to the editor command,
864 to allow commands with spaces in them. Problem noted by watching
874 to allow commands with spaces in them. Problem noted by watching
865 Ian Oswald's video about textpad under win32 at
875 Ian Oswald's video about textpad under win32 at
866 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
876 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
867
877
868 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
878 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
869 describing magics (we haven't used @ for a loong time).
879 describing magics (we haven't used @ for a loong time).
870
880
871 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
881 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
872 contributed by marienz to close
882 contributed by marienz to close
873 http://www.scipy.net/roundup/ipython/issue53.
883 http://www.scipy.net/roundup/ipython/issue53.
874
884
875 2006-02-10 Ville Vainio <vivainio@gmail.com>
885 2006-02-10 Ville Vainio <vivainio@gmail.com>
876
886
877 * genutils.py: getoutput now works in win32 too
887 * genutils.py: getoutput now works in win32 too
878
888
879 * completer.py: alias and magic completion only invoked
889 * completer.py: alias and magic completion only invoked
880 at the first "item" in the line, to avoid "cd %store"
890 at the first "item" in the line, to avoid "cd %store"
881 nonsense.
891 nonsense.
882
892
883 2006-02-09 Ville Vainio <vivainio@gmail.com>
893 2006-02-09 Ville Vainio <vivainio@gmail.com>
884
894
885 * test/*: Added a unit testing framework (finally).
895 * test/*: Added a unit testing framework (finally).
886 '%run runtests.py' to run test_*.
896 '%run runtests.py' to run test_*.
887
897
888 * ipapi.py: Exposed runlines and set_custom_exc
898 * ipapi.py: Exposed runlines and set_custom_exc
889
899
890 2006-02-07 Ville Vainio <vivainio@gmail.com>
900 2006-02-07 Ville Vainio <vivainio@gmail.com>
891
901
892 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
902 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
893 instead use "f(1 2)" as before.
903 instead use "f(1 2)" as before.
894
904
895 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
905 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
896
906
897 * IPython/demo.py (IPythonDemo): Add new classes to the demo
907 * IPython/demo.py (IPythonDemo): Add new classes to the demo
898 facilities, for demos processed by the IPython input filter
908 facilities, for demos processed by the IPython input filter
899 (IPythonDemo), and for running a script one-line-at-a-time as a
909 (IPythonDemo), and for running a script one-line-at-a-time as a
900 demo, both for pure Python (LineDemo) and for IPython-processed
910 demo, both for pure Python (LineDemo) and for IPython-processed
901 input (IPythonLineDemo). After a request by Dave Kohel, from the
911 input (IPythonLineDemo). After a request by Dave Kohel, from the
902 SAGE team.
912 SAGE team.
903 (Demo.edit): added an edit() method to the demo objects, to edit
913 (Demo.edit): added an edit() method to the demo objects, to edit
904 the in-memory copy of the last executed block.
914 the in-memory copy of the last executed block.
905
915
906 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
916 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
907 processing to %edit, %macro and %save. These commands can now be
917 processing to %edit, %macro and %save. These commands can now be
908 invoked on the unprocessed input as it was typed by the user
918 invoked on the unprocessed input as it was typed by the user
909 (without any prefilters applied). After requests by the SAGE team
919 (without any prefilters applied). After requests by the SAGE team
910 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
920 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
911
921
912 2006-02-01 Ville Vainio <vivainio@gmail.com>
922 2006-02-01 Ville Vainio <vivainio@gmail.com>
913
923
914 * setup.py, eggsetup.py: easy_install ipython==dev works
924 * setup.py, eggsetup.py: easy_install ipython==dev works
915 correctly now (on Linux)
925 correctly now (on Linux)
916
926
917 * ipy_user_conf,ipmaker: user config changes, removed spurious
927 * ipy_user_conf,ipmaker: user config changes, removed spurious
918 warnings
928 warnings
919
929
920 * iplib: if rc.banner is string, use it as is.
930 * iplib: if rc.banner is string, use it as is.
921
931
922 * Magic: %pycat accepts a string argument and pages it's contents.
932 * Magic: %pycat accepts a string argument and pages it's contents.
923
933
924
934
925 2006-01-30 Ville Vainio <vivainio@gmail.com>
935 2006-01-30 Ville Vainio <vivainio@gmail.com>
926
936
927 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
937 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
928 Now %store and bookmarks work through PickleShare, meaning that
938 Now %store and bookmarks work through PickleShare, meaning that
929 concurrent access is possible and all ipython sessions see the
939 concurrent access is possible and all ipython sessions see the
930 same database situation all the time, instead of snapshot of
940 same database situation all the time, instead of snapshot of
931 the situation when the session was started. Hence, %bookmark
941 the situation when the session was started. Hence, %bookmark
932 results are immediately accessible from othes sessions. The database
942 results are immediately accessible from othes sessions. The database
933 is also available for use by user extensions. See:
943 is also available for use by user extensions. See:
934 http://www.python.org/pypi/pickleshare
944 http://www.python.org/pypi/pickleshare
935
945
936 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
946 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
937
947
938 * aliases can now be %store'd
948 * aliases can now be %store'd
939
949
940 * path.py moved to Extensions so that pickleshare does not need
950 * path.py moved to Extensions so that pickleshare does not need
941 IPython-specific import. Extensions added to pythonpath right
951 IPython-specific import. Extensions added to pythonpath right
942 at __init__.
952 at __init__.
943
953
944 * iplib.py: ipalias deprecated/redundant; aliases are converted and
954 * iplib.py: ipalias deprecated/redundant; aliases are converted and
945 called with _ip.system and the pre-transformed command string.
955 called with _ip.system and the pre-transformed command string.
946
956
947 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
957 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
948
958
949 * IPython/iplib.py (interact): Fix that we were not catching
959 * IPython/iplib.py (interact): Fix that we were not catching
950 KeyboardInterrupt exceptions properly. I'm not quite sure why the
960 KeyboardInterrupt exceptions properly. I'm not quite sure why the
951 logic here had to change, but it's fixed now.
961 logic here had to change, but it's fixed now.
952
962
953 2006-01-29 Ville Vainio <vivainio@gmail.com>
963 2006-01-29 Ville Vainio <vivainio@gmail.com>
954
964
955 * iplib.py: Try to import pyreadline on Windows.
965 * iplib.py: Try to import pyreadline on Windows.
956
966
957 2006-01-27 Ville Vainio <vivainio@gmail.com>
967 2006-01-27 Ville Vainio <vivainio@gmail.com>
958
968
959 * iplib.py: Expose ipapi as _ip in builtin namespace.
969 * iplib.py: Expose ipapi as _ip in builtin namespace.
960 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
970 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
961 and ip_set_hook (-> _ip.set_hook) redundant. % and !
971 and ip_set_hook (-> _ip.set_hook) redundant. % and !
962 syntax now produce _ip.* variant of the commands.
972 syntax now produce _ip.* variant of the commands.
963
973
964 * "_ip.options().autoedit_syntax = 2" automatically throws
974 * "_ip.options().autoedit_syntax = 2" automatically throws
965 user to editor for syntax error correction without prompting.
975 user to editor for syntax error correction without prompting.
966
976
967 2006-01-27 Ville Vainio <vivainio@gmail.com>
977 2006-01-27 Ville Vainio <vivainio@gmail.com>
968
978
969 * ipmaker.py: Give "realistic" sys.argv for scripts (without
979 * ipmaker.py: Give "realistic" sys.argv for scripts (without
970 'ipython' at argv[0]) executed through command line.
980 'ipython' at argv[0]) executed through command line.
971 NOTE: this DEPRECATES calling ipython with multiple scripts
981 NOTE: this DEPRECATES calling ipython with multiple scripts
972 ("ipython a.py b.py c.py")
982 ("ipython a.py b.py c.py")
973
983
974 * iplib.py, hooks.py: Added configurable input prefilter,
984 * iplib.py, hooks.py: Added configurable input prefilter,
975 named 'input_prefilter'. See ext_rescapture.py for example
985 named 'input_prefilter'. See ext_rescapture.py for example
976 usage.
986 usage.
977
987
978 * ext_rescapture.py, Magic.py: Better system command output capture
988 * ext_rescapture.py, Magic.py: Better system command output capture
979 through 'var = !ls' (deprecates user-visible %sc). Same notation
989 through 'var = !ls' (deprecates user-visible %sc). Same notation
980 applies for magics, 'var = %alias' assigns alias list to var.
990 applies for magics, 'var = %alias' assigns alias list to var.
981
991
982 * ipapi.py: added meta() for accessing extension-usable data store.
992 * ipapi.py: added meta() for accessing extension-usable data store.
983
993
984 * iplib.py: added InteractiveShell.getapi(). New magics should be
994 * iplib.py: added InteractiveShell.getapi(). New magics should be
985 written doing self.getapi() instead of using the shell directly.
995 written doing self.getapi() instead of using the shell directly.
986
996
987 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
997 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
988 %store foo >> ~/myfoo.txt to store variables to files (in clean
998 %store foo >> ~/myfoo.txt to store variables to files (in clean
989 textual form, not a restorable pickle).
999 textual form, not a restorable pickle).
990
1000
991 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
1001 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
992
1002
993 * usage.py, Magic.py: added %quickref
1003 * usage.py, Magic.py: added %quickref
994
1004
995 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
1005 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
996
1006
997 * GetoptErrors when invoking magics etc. with wrong args
1007 * GetoptErrors when invoking magics etc. with wrong args
998 are now more helpful:
1008 are now more helpful:
999 GetoptError: option -l not recognized (allowed: "qb" )
1009 GetoptError: option -l not recognized (allowed: "qb" )
1000
1010
1001 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
1011 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
1002
1012
1003 * IPython/demo.py (Demo.show): Flush stdout after each block, so
1013 * IPython/demo.py (Demo.show): Flush stdout after each block, so
1004 computationally intensive blocks don't appear to stall the demo.
1014 computationally intensive blocks don't appear to stall the demo.
1005
1015
1006 2006-01-24 Ville Vainio <vivainio@gmail.com>
1016 2006-01-24 Ville Vainio <vivainio@gmail.com>
1007
1017
1008 * iplib.py, hooks.py: 'result_display' hook can return a non-None
1018 * iplib.py, hooks.py: 'result_display' hook can return a non-None
1009 value to manipulate resulting history entry.
1019 value to manipulate resulting history entry.
1010
1020
1011 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
1021 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
1012 to instance methods of IPApi class, to make extending an embedded
1022 to instance methods of IPApi class, to make extending an embedded
1013 IPython feasible. See ext_rehashdir.py for example usage.
1023 IPython feasible. See ext_rehashdir.py for example usage.
1014
1024
1015 * Merged 1071-1076 from branches/0.7.1
1025 * Merged 1071-1076 from branches/0.7.1
1016
1026
1017
1027
1018 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
1028 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
1019
1029
1020 * tools/release (daystamp): Fix build tools to use the new
1030 * tools/release (daystamp): Fix build tools to use the new
1021 eggsetup.py script to build lightweight eggs.
1031 eggsetup.py script to build lightweight eggs.
1022
1032
1023 * Applied changesets 1062 and 1064 before 0.7.1 release.
1033 * Applied changesets 1062 and 1064 before 0.7.1 release.
1024
1034
1025 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
1035 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
1026 see the raw input history (without conversions like %ls ->
1036 see the raw input history (without conversions like %ls ->
1027 ipmagic("ls")). After a request from W. Stein, SAGE
1037 ipmagic("ls")). After a request from W. Stein, SAGE
1028 (http://modular.ucsd.edu/sage) developer. This information is
1038 (http://modular.ucsd.edu/sage) developer. This information is
1029 stored in the input_hist_raw attribute of the IPython instance, so
1039 stored in the input_hist_raw attribute of the IPython instance, so
1030 developers can access it if needed (it's an InputList instance).
1040 developers can access it if needed (it's an InputList instance).
1031
1041
1032 * Versionstring = 0.7.2.svn
1042 * Versionstring = 0.7.2.svn
1033
1043
1034 * eggsetup.py: A separate script for constructing eggs, creates
1044 * eggsetup.py: A separate script for constructing eggs, creates
1035 proper launch scripts even on Windows (an .exe file in
1045 proper launch scripts even on Windows (an .exe file in
1036 \python24\scripts).
1046 \python24\scripts).
1037
1047
1038 * ipapi.py: launch_new_instance, launch entry point needed for the
1048 * ipapi.py: launch_new_instance, launch entry point needed for the
1039 egg.
1049 egg.
1040
1050
1041 2006-01-23 Ville Vainio <vivainio@gmail.com>
1051 2006-01-23 Ville Vainio <vivainio@gmail.com>
1042
1052
1043 * Added %cpaste magic for pasting python code
1053 * Added %cpaste magic for pasting python code
1044
1054
1045 2006-01-22 Ville Vainio <vivainio@gmail.com>
1055 2006-01-22 Ville Vainio <vivainio@gmail.com>
1046
1056
1047 * Merge from branches/0.7.1 into trunk, revs 1052-1057
1057 * Merge from branches/0.7.1 into trunk, revs 1052-1057
1048
1058
1049 * Versionstring = 0.7.2.svn
1059 * Versionstring = 0.7.2.svn
1050
1060
1051 * eggsetup.py: A separate script for constructing eggs, creates
1061 * eggsetup.py: A separate script for constructing eggs, creates
1052 proper launch scripts even on Windows (an .exe file in
1062 proper launch scripts even on Windows (an .exe file in
1053 \python24\scripts).
1063 \python24\scripts).
1054
1064
1055 * ipapi.py: launch_new_instance, launch entry point needed for the
1065 * ipapi.py: launch_new_instance, launch entry point needed for the
1056 egg.
1066 egg.
1057
1067
1058 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
1068 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
1059
1069
1060 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
1070 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
1061 %pfile foo would print the file for foo even if it was a binary.
1071 %pfile foo would print the file for foo even if it was a binary.
1062 Now, extensions '.so' and '.dll' are skipped.
1072 Now, extensions '.so' and '.dll' are skipped.
1063
1073
1064 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
1074 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
1065 bug, where macros would fail in all threaded modes. I'm not 100%
1075 bug, where macros would fail in all threaded modes. I'm not 100%
1066 sure, so I'm going to put out an rc instead of making a release
1076 sure, so I'm going to put out an rc instead of making a release
1067 today, and wait for feedback for at least a few days.
1077 today, and wait for feedback for at least a few days.
1068
1078
1069 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
1079 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
1070 it...) the handling of pasting external code with autoindent on.
1080 it...) the handling of pasting external code with autoindent on.
1071 To get out of a multiline input, the rule will appear for most
1081 To get out of a multiline input, the rule will appear for most
1072 users unchanged: two blank lines or change the indent level
1082 users unchanged: two blank lines or change the indent level
1073 proposed by IPython. But there is a twist now: you can
1083 proposed by IPython. But there is a twist now: you can
1074 add/subtract only *one or two spaces*. If you add/subtract three
1084 add/subtract only *one or two spaces*. If you add/subtract three
1075 or more (unless you completely delete the line), IPython will
1085 or more (unless you completely delete the line), IPython will
1076 accept that line, and you'll need to enter a second one of pure
1086 accept that line, and you'll need to enter a second one of pure
1077 whitespace. I know it sounds complicated, but I can't find a
1087 whitespace. I know it sounds complicated, but I can't find a
1078 different solution that covers all the cases, with the right
1088 different solution that covers all the cases, with the right
1079 heuristics. Hopefully in actual use, nobody will really notice
1089 heuristics. Hopefully in actual use, nobody will really notice
1080 all these strange rules and things will 'just work'.
1090 all these strange rules and things will 'just work'.
1081
1091
1082 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
1092 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
1083
1093
1084 * IPython/iplib.py (interact): catch exceptions which can be
1094 * IPython/iplib.py (interact): catch exceptions which can be
1085 triggered asynchronously by signal handlers. Thanks to an
1095 triggered asynchronously by signal handlers. Thanks to an
1086 automatic crash report, submitted by Colin Kingsley
1096 automatic crash report, submitted by Colin Kingsley
1087 <tercel-AT-gentoo.org>.
1097 <tercel-AT-gentoo.org>.
1088
1098
1089 2006-01-20 Ville Vainio <vivainio@gmail.com>
1099 2006-01-20 Ville Vainio <vivainio@gmail.com>
1090
1100
1091 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
1101 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
1092 (%rehashdir, very useful, try it out) of how to extend ipython
1102 (%rehashdir, very useful, try it out) of how to extend ipython
1093 with new magics. Also added Extensions dir to pythonpath to make
1103 with new magics. Also added Extensions dir to pythonpath to make
1094 importing extensions easy.
1104 importing extensions easy.
1095
1105
1096 * %store now complains when trying to store interactively declared
1106 * %store now complains when trying to store interactively declared
1097 classes / instances of those classes.
1107 classes / instances of those classes.
1098
1108
1099 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
1109 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
1100 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
1110 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
1101 if they exist, and ipy_user_conf.py with some defaults is created for
1111 if they exist, and ipy_user_conf.py with some defaults is created for
1102 the user.
1112 the user.
1103
1113
1104 * Startup rehashing done by the config file, not InterpreterExec.
1114 * Startup rehashing done by the config file, not InterpreterExec.
1105 This means system commands are available even without selecting the
1115 This means system commands are available even without selecting the
1106 pysh profile. It's the sensible default after all.
1116 pysh profile. It's the sensible default after all.
1107
1117
1108 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
1118 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
1109
1119
1110 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
1120 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
1111 multiline code with autoindent on working. But I am really not
1121 multiline code with autoindent on working. But I am really not
1112 sure, so this needs more testing. Will commit a debug-enabled
1122 sure, so this needs more testing. Will commit a debug-enabled
1113 version for now, while I test it some more, so that Ville and
1123 version for now, while I test it some more, so that Ville and
1114 others may also catch any problems. Also made
1124 others may also catch any problems. Also made
1115 self.indent_current_str() a method, to ensure that there's no
1125 self.indent_current_str() a method, to ensure that there's no
1116 chance of the indent space count and the corresponding string
1126 chance of the indent space count and the corresponding string
1117 falling out of sync. All code needing the string should just call
1127 falling out of sync. All code needing the string should just call
1118 the method.
1128 the method.
1119
1129
1120 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
1130 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
1121
1131
1122 * IPython/Magic.py (magic_edit): fix check for when users don't
1132 * IPython/Magic.py (magic_edit): fix check for when users don't
1123 save their output files, the try/except was in the wrong section.
1133 save their output files, the try/except was in the wrong section.
1124
1134
1125 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1135 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1126
1136
1127 * IPython/Magic.py (magic_run): fix __file__ global missing from
1137 * IPython/Magic.py (magic_run): fix __file__ global missing from
1128 script's namespace when executed via %run. After a report by
1138 script's namespace when executed via %run. After a report by
1129 Vivian.
1139 Vivian.
1130
1140
1131 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
1141 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
1132 when using python 2.4. The parent constructor changed in 2.4, and
1142 when using python 2.4. The parent constructor changed in 2.4, and
1133 we need to track it directly (we can't call it, as it messes up
1143 we need to track it directly (we can't call it, as it messes up
1134 readline and tab-completion inside our pdb would stop working).
1144 readline and tab-completion inside our pdb would stop working).
1135 After a bug report by R. Bernstein <rocky-AT-panix.com>.
1145 After a bug report by R. Bernstein <rocky-AT-panix.com>.
1136
1146
1137 2006-01-16 Ville Vainio <vivainio@gmail.com>
1147 2006-01-16 Ville Vainio <vivainio@gmail.com>
1138
1148
1139 * Ipython/magic.py: Reverted back to old %edit functionality
1149 * Ipython/magic.py: Reverted back to old %edit functionality
1140 that returns file contents on exit.
1150 that returns file contents on exit.
1141
1151
1142 * IPython/path.py: Added Jason Orendorff's "path" module to
1152 * IPython/path.py: Added Jason Orendorff's "path" module to
1143 IPython tree, http://www.jorendorff.com/articles/python/path/.
1153 IPython tree, http://www.jorendorff.com/articles/python/path/.
1144 You can get path objects conveniently through %sc, and !!, e.g.:
1154 You can get path objects conveniently through %sc, and !!, e.g.:
1145 sc files=ls
1155 sc files=ls
1146 for p in files.paths: # or files.p
1156 for p in files.paths: # or files.p
1147 print p,p.mtime
1157 print p,p.mtime
1148
1158
1149 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
1159 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
1150 now work again without considering the exclusion regexp -
1160 now work again without considering the exclusion regexp -
1151 hence, things like ',foo my/path' turn to 'foo("my/path")'
1161 hence, things like ',foo my/path' turn to 'foo("my/path")'
1152 instead of syntax error.
1162 instead of syntax error.
1153
1163
1154
1164
1155 2006-01-14 Ville Vainio <vivainio@gmail.com>
1165 2006-01-14 Ville Vainio <vivainio@gmail.com>
1156
1166
1157 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
1167 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
1158 ipapi decorators for python 2.4 users, options() provides access to rc
1168 ipapi decorators for python 2.4 users, options() provides access to rc
1159 data.
1169 data.
1160
1170
1161 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
1171 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
1162 as path separators (even on Linux ;-). Space character after
1172 as path separators (even on Linux ;-). Space character after
1163 backslash (as yielded by tab completer) is still space;
1173 backslash (as yielded by tab completer) is still space;
1164 "%cd long\ name" works as expected.
1174 "%cd long\ name" works as expected.
1165
1175
1166 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
1176 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
1167 as "chain of command", with priority. API stays the same,
1177 as "chain of command", with priority. API stays the same,
1168 TryNext exception raised by a hook function signals that
1178 TryNext exception raised by a hook function signals that
1169 current hook failed and next hook should try handling it, as
1179 current hook failed and next hook should try handling it, as
1170 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
1180 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
1171 requested configurable display hook, which is now implemented.
1181 requested configurable display hook, which is now implemented.
1172
1182
1173 2006-01-13 Ville Vainio <vivainio@gmail.com>
1183 2006-01-13 Ville Vainio <vivainio@gmail.com>
1174
1184
1175 * IPython/platutils*.py: platform specific utility functions,
1185 * IPython/platutils*.py: platform specific utility functions,
1176 so far only set_term_title is implemented (change terminal
1186 so far only set_term_title is implemented (change terminal
1177 label in windowing systems). %cd now changes the title to
1187 label in windowing systems). %cd now changes the title to
1178 current dir.
1188 current dir.
1179
1189
1180 * IPython/Release.py: Added myself to "authors" list,
1190 * IPython/Release.py: Added myself to "authors" list,
1181 had to create new files.
1191 had to create new files.
1182
1192
1183 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
1193 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
1184 shell escape; not a known bug but had potential to be one in the
1194 shell escape; not a known bug but had potential to be one in the
1185 future.
1195 future.
1186
1196
1187 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
1197 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
1188 extension API for IPython! See the module for usage example. Fix
1198 extension API for IPython! See the module for usage example. Fix
1189 OInspect for docstring-less magic functions.
1199 OInspect for docstring-less magic functions.
1190
1200
1191
1201
1192 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
1202 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
1193
1203
1194 * IPython/iplib.py (raw_input): temporarily deactivate all
1204 * IPython/iplib.py (raw_input): temporarily deactivate all
1195 attempts at allowing pasting of code with autoindent on. It
1205 attempts at allowing pasting of code with autoindent on. It
1196 introduced bugs (reported by Prabhu) and I can't seem to find a
1206 introduced bugs (reported by Prabhu) and I can't seem to find a
1197 robust combination which works in all cases. Will have to revisit
1207 robust combination which works in all cases. Will have to revisit
1198 later.
1208 later.
1199
1209
1200 * IPython/genutils.py: remove isspace() function. We've dropped
1210 * IPython/genutils.py: remove isspace() function. We've dropped
1201 2.2 compatibility, so it's OK to use the string method.
1211 2.2 compatibility, so it's OK to use the string method.
1202
1212
1203 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1213 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1204
1214
1205 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
1215 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
1206 matching what NOT to autocall on, to include all python binary
1216 matching what NOT to autocall on, to include all python binary
1207 operators (including things like 'and', 'or', 'is' and 'in').
1217 operators (including things like 'and', 'or', 'is' and 'in').
1208 Prompted by a bug report on 'foo & bar', but I realized we had
1218 Prompted by a bug report on 'foo & bar', but I realized we had
1209 many more potential bug cases with other operators. The regexp is
1219 many more potential bug cases with other operators. The regexp is
1210 self.re_exclude_auto, it's fairly commented.
1220 self.re_exclude_auto, it's fairly commented.
1211
1221
1212 2006-01-12 Ville Vainio <vivainio@gmail.com>
1222 2006-01-12 Ville Vainio <vivainio@gmail.com>
1213
1223
1214 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
1224 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
1215 Prettified and hardened string/backslash quoting with ipsystem(),
1225 Prettified and hardened string/backslash quoting with ipsystem(),
1216 ipalias() and ipmagic(). Now even \ characters are passed to
1226 ipalias() and ipmagic(). Now even \ characters are passed to
1217 %magics, !shell escapes and aliases exactly as they are in the
1227 %magics, !shell escapes and aliases exactly as they are in the
1218 ipython command line. Should improve backslash experience,
1228 ipython command line. Should improve backslash experience,
1219 particularly in Windows (path delimiter for some commands that
1229 particularly in Windows (path delimiter for some commands that
1220 won't understand '/'), but Unix benefits as well (regexps). %cd
1230 won't understand '/'), but Unix benefits as well (regexps). %cd
1221 magic still doesn't support backslash path delimiters, though. Also
1231 magic still doesn't support backslash path delimiters, though. Also
1222 deleted all pretense of supporting multiline command strings in
1232 deleted all pretense of supporting multiline command strings in
1223 !system or %magic commands. Thanks to Jerry McRae for suggestions.
1233 !system or %magic commands. Thanks to Jerry McRae for suggestions.
1224
1234
1225 * doc/build_doc_instructions.txt added. Documentation on how to
1235 * doc/build_doc_instructions.txt added. Documentation on how to
1226 use doc/update_manual.py, added yesterday. Both files contributed
1236 use doc/update_manual.py, added yesterday. Both files contributed
1227 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
1237 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
1228 doc/*.sh for deprecation at a later date.
1238 doc/*.sh for deprecation at a later date.
1229
1239
1230 * /ipython.py Added ipython.py to root directory for
1240 * /ipython.py Added ipython.py to root directory for
1231 zero-installation (tar xzvf ipython.tgz; cd ipython; python
1241 zero-installation (tar xzvf ipython.tgz; cd ipython; python
1232 ipython.py) and development convenience (no need to keep doing
1242 ipython.py) and development convenience (no need to keep doing
1233 "setup.py install" between changes).
1243 "setup.py install" between changes).
1234
1244
1235 * Made ! and !! shell escapes work (again) in multiline expressions:
1245 * Made ! and !! shell escapes work (again) in multiline expressions:
1236 if 1:
1246 if 1:
1237 !ls
1247 !ls
1238 !!ls
1248 !!ls
1239
1249
1240 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1250 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1241
1251
1242 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
1252 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
1243 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
1253 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
1244 module in case-insensitive installation. Was causing crashes
1254 module in case-insensitive installation. Was causing crashes
1245 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
1255 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
1246
1256
1247 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
1257 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
1248 <marienz-AT-gentoo.org>, closes
1258 <marienz-AT-gentoo.org>, closes
1249 http://www.scipy.net/roundup/ipython/issue51.
1259 http://www.scipy.net/roundup/ipython/issue51.
1250
1260
1251 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
1261 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
1252
1262
1253 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
1263 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
1254 problem of excessive CPU usage under *nix and keyboard lag under
1264 problem of excessive CPU usage under *nix and keyboard lag under
1255 win32.
1265 win32.
1256
1266
1257 2006-01-10 *** Released version 0.7.0
1267 2006-01-10 *** Released version 0.7.0
1258
1268
1259 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
1269 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
1260
1270
1261 * IPython/Release.py (revision): tag version number to 0.7.0,
1271 * IPython/Release.py (revision): tag version number to 0.7.0,
1262 ready for release.
1272 ready for release.
1263
1273
1264 * IPython/Magic.py (magic_edit): Add print statement to %edit so
1274 * IPython/Magic.py (magic_edit): Add print statement to %edit so
1265 it informs the user of the name of the temp. file used. This can
1275 it informs the user of the name of the temp. file used. This can
1266 help if you decide later to reuse that same file, so you know
1276 help if you decide later to reuse that same file, so you know
1267 where to copy the info from.
1277 where to copy the info from.
1268
1278
1269 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
1279 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
1270
1280
1271 * setup_bdist_egg.py: little script to build an egg. Added
1281 * setup_bdist_egg.py: little script to build an egg. Added
1272 support in the release tools as well.
1282 support in the release tools as well.
1273
1283
1274 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
1284 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
1275
1285
1276 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
1286 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
1277 version selection (new -wxversion command line and ipythonrc
1287 version selection (new -wxversion command line and ipythonrc
1278 parameter). Patch contributed by Arnd Baecker
1288 parameter). Patch contributed by Arnd Baecker
1279 <arnd.baecker-AT-web.de>.
1289 <arnd.baecker-AT-web.de>.
1280
1290
1281 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1291 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1282 embedded instances, for variables defined at the interactive
1292 embedded instances, for variables defined at the interactive
1283 prompt of the embedded ipython. Reported by Arnd.
1293 prompt of the embedded ipython. Reported by Arnd.
1284
1294
1285 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
1295 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
1286 it can be used as a (stateful) toggle, or with a direct parameter.
1296 it can be used as a (stateful) toggle, or with a direct parameter.
1287
1297
1288 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
1298 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
1289 could be triggered in certain cases and cause the traceback
1299 could be triggered in certain cases and cause the traceback
1290 printer not to work.
1300 printer not to work.
1291
1301
1292 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
1302 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
1293
1303
1294 * IPython/iplib.py (_should_recompile): Small fix, closes
1304 * IPython/iplib.py (_should_recompile): Small fix, closes
1295 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
1305 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
1296
1306
1297 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
1307 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
1298
1308
1299 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
1309 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
1300 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
1310 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
1301 Moad for help with tracking it down.
1311 Moad for help with tracking it down.
1302
1312
1303 * IPython/iplib.py (handle_auto): fix autocall handling for
1313 * IPython/iplib.py (handle_auto): fix autocall handling for
1304 objects which support BOTH __getitem__ and __call__ (so that f [x]
1314 objects which support BOTH __getitem__ and __call__ (so that f [x]
1305 is left alone, instead of becoming f([x]) automatically).
1315 is left alone, instead of becoming f([x]) automatically).
1306
1316
1307 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
1317 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
1308 Ville's patch.
1318 Ville's patch.
1309
1319
1310 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
1320 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
1311
1321
1312 * IPython/iplib.py (handle_auto): changed autocall semantics to
1322 * IPython/iplib.py (handle_auto): changed autocall semantics to
1313 include 'smart' mode, where the autocall transformation is NOT
1323 include 'smart' mode, where the autocall transformation is NOT
1314 applied if there are no arguments on the line. This allows you to
1324 applied if there are no arguments on the line. This allows you to
1315 just type 'foo' if foo is a callable to see its internal form,
1325 just type 'foo' if foo is a callable to see its internal form,
1316 instead of having it called with no arguments (typically a
1326 instead of having it called with no arguments (typically a
1317 mistake). The old 'full' autocall still exists: for that, you
1327 mistake). The old 'full' autocall still exists: for that, you
1318 need to set the 'autocall' parameter to 2 in your ipythonrc file.
1328 need to set the 'autocall' parameter to 2 in your ipythonrc file.
1319
1329
1320 * IPython/completer.py (Completer.attr_matches): add
1330 * IPython/completer.py (Completer.attr_matches): add
1321 tab-completion support for Enthoughts' traits. After a report by
1331 tab-completion support for Enthoughts' traits. After a report by
1322 Arnd and a patch by Prabhu.
1332 Arnd and a patch by Prabhu.
1323
1333
1324 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
1334 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
1325
1335
1326 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
1336 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
1327 Schmolck's patch to fix inspect.getinnerframes().
1337 Schmolck's patch to fix inspect.getinnerframes().
1328
1338
1329 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
1339 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
1330 for embedded instances, regarding handling of namespaces and items
1340 for embedded instances, regarding handling of namespaces and items
1331 added to the __builtin__ one. Multiple embedded instances and
1341 added to the __builtin__ one. Multiple embedded instances and
1332 recursive embeddings should work better now (though I'm not sure
1342 recursive embeddings should work better now (though I'm not sure
1333 I've got all the corner cases fixed, that code is a bit of a brain
1343 I've got all the corner cases fixed, that code is a bit of a brain
1334 twister).
1344 twister).
1335
1345
1336 * IPython/Magic.py (magic_edit): added support to edit in-memory
1346 * IPython/Magic.py (magic_edit): added support to edit in-memory
1337 macros (automatically creates the necessary temp files). %edit
1347 macros (automatically creates the necessary temp files). %edit
1338 also doesn't return the file contents anymore, it's just noise.
1348 also doesn't return the file contents anymore, it's just noise.
1339
1349
1340 * IPython/completer.py (Completer.attr_matches): revert change to
1350 * IPython/completer.py (Completer.attr_matches): revert change to
1341 complete only on attributes listed in __all__. I realized it
1351 complete only on attributes listed in __all__. I realized it
1342 cripples the tab-completion system as a tool for exploring the
1352 cripples the tab-completion system as a tool for exploring the
1343 internals of unknown libraries (it renders any non-__all__
1353 internals of unknown libraries (it renders any non-__all__
1344 attribute off-limits). I got bit by this when trying to see
1354 attribute off-limits). I got bit by this when trying to see
1345 something inside the dis module.
1355 something inside the dis module.
1346
1356
1347 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
1357 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
1348
1358
1349 * IPython/iplib.py (InteractiveShell.__init__): add .meta
1359 * IPython/iplib.py (InteractiveShell.__init__): add .meta
1350 namespace for users and extension writers to hold data in. This
1360 namespace for users and extension writers to hold data in. This
1351 follows the discussion in
1361 follows the discussion in
1352 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
1362 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
1353
1363
1354 * IPython/completer.py (IPCompleter.complete): small patch to help
1364 * IPython/completer.py (IPCompleter.complete): small patch to help
1355 tab-completion under Emacs, after a suggestion by John Barnard
1365 tab-completion under Emacs, after a suggestion by John Barnard
1356 <barnarj-AT-ccf.org>.
1366 <barnarj-AT-ccf.org>.
1357
1367
1358 * IPython/Magic.py (Magic.extract_input_slices): added support for
1368 * IPython/Magic.py (Magic.extract_input_slices): added support for
1359 the slice notation in magics to use N-M to represent numbers N...M
1369 the slice notation in magics to use N-M to represent numbers N...M
1360 (closed endpoints). This is used by %macro and %save.
1370 (closed endpoints). This is used by %macro and %save.
1361
1371
1362 * IPython/completer.py (Completer.attr_matches): for modules which
1372 * IPython/completer.py (Completer.attr_matches): for modules which
1363 define __all__, complete only on those. After a patch by Jeffrey
1373 define __all__, complete only on those. After a patch by Jeffrey
1364 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
1374 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
1365 speed up this routine.
1375 speed up this routine.
1366
1376
1367 * IPython/Logger.py (Logger.log): fix a history handling bug. I
1377 * IPython/Logger.py (Logger.log): fix a history handling bug. I
1368 don't know if this is the end of it, but the behavior now is
1378 don't know if this is the end of it, but the behavior now is
1369 certainly much more correct. Note that coupled with macros,
1379 certainly much more correct. Note that coupled with macros,
1370 slightly surprising (at first) behavior may occur: a macro will in
1380 slightly surprising (at first) behavior may occur: a macro will in
1371 general expand to multiple lines of input, so upon exiting, the
1381 general expand to multiple lines of input, so upon exiting, the
1372 in/out counters will both be bumped by the corresponding amount
1382 in/out counters will both be bumped by the corresponding amount
1373 (as if the macro's contents had been typed interactively). Typing
1383 (as if the macro's contents had been typed interactively). Typing
1374 %hist will reveal the intermediate (silently processed) lines.
1384 %hist will reveal the intermediate (silently processed) lines.
1375
1385
1376 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
1386 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
1377 pickle to fail (%run was overwriting __main__ and not restoring
1387 pickle to fail (%run was overwriting __main__ and not restoring
1378 it, but pickle relies on __main__ to operate).
1388 it, but pickle relies on __main__ to operate).
1379
1389
1380 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
1390 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
1381 using properties, but forgot to make the main InteractiveShell
1391 using properties, but forgot to make the main InteractiveShell
1382 class a new-style class. Properties fail silently, and
1392 class a new-style class. Properties fail silently, and
1383 mysteriously, with old-style class (getters work, but
1393 mysteriously, with old-style class (getters work, but
1384 setters don't do anything).
1394 setters don't do anything).
1385
1395
1386 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
1396 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
1387
1397
1388 * IPython/Magic.py (magic_history): fix history reporting bug (I
1398 * IPython/Magic.py (magic_history): fix history reporting bug (I
1389 know some nasties are still there, I just can't seem to find a
1399 know some nasties are still there, I just can't seem to find a
1390 reproducible test case to track them down; the input history is
1400 reproducible test case to track them down; the input history is
1391 falling out of sync...)
1401 falling out of sync...)
1392
1402
1393 * IPython/iplib.py (handle_shell_escape): fix bug where both
1403 * IPython/iplib.py (handle_shell_escape): fix bug where both
1394 aliases and system accesses where broken for indented code (such
1404 aliases and system accesses where broken for indented code (such
1395 as loops).
1405 as loops).
1396
1406
1397 * IPython/genutils.py (shell): fix small but critical bug for
1407 * IPython/genutils.py (shell): fix small but critical bug for
1398 win32 system access.
1408 win32 system access.
1399
1409
1400 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
1410 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
1401
1411
1402 * IPython/iplib.py (showtraceback): remove use of the
1412 * IPython/iplib.py (showtraceback): remove use of the
1403 sys.last_{type/value/traceback} structures, which are non
1413 sys.last_{type/value/traceback} structures, which are non
1404 thread-safe.
1414 thread-safe.
1405 (_prefilter): change control flow to ensure that we NEVER
1415 (_prefilter): change control flow to ensure that we NEVER
1406 introspect objects when autocall is off. This will guarantee that
1416 introspect objects when autocall is off. This will guarantee that
1407 having an input line of the form 'x.y', where access to attribute
1417 having an input line of the form 'x.y', where access to attribute
1408 'y' has side effects, doesn't trigger the side effect TWICE. It
1418 'y' has side effects, doesn't trigger the side effect TWICE. It
1409 is important to note that, with autocall on, these side effects
1419 is important to note that, with autocall on, these side effects
1410 can still happen.
1420 can still happen.
1411 (ipsystem): new builtin, to complete the ip{magic/alias/system}
1421 (ipsystem): new builtin, to complete the ip{magic/alias/system}
1412 trio. IPython offers these three kinds of special calls which are
1422 trio. IPython offers these three kinds of special calls which are
1413 not python code, and it's a good thing to have their call method
1423 not python code, and it's a good thing to have their call method
1414 be accessible as pure python functions (not just special syntax at
1424 be accessible as pure python functions (not just special syntax at
1415 the command line). It gives us a better internal implementation
1425 the command line). It gives us a better internal implementation
1416 structure, as well as exposing these for user scripting more
1426 structure, as well as exposing these for user scripting more
1417 cleanly.
1427 cleanly.
1418
1428
1419 * IPython/macro.py (Macro.__init__): moved macros to a standalone
1429 * IPython/macro.py (Macro.__init__): moved macros to a standalone
1420 file. Now that they'll be more likely to be used with the
1430 file. Now that they'll be more likely to be used with the
1421 persistance system (%store), I want to make sure their module path
1431 persistance system (%store), I want to make sure their module path
1422 doesn't change in the future, so that we don't break things for
1432 doesn't change in the future, so that we don't break things for
1423 users' persisted data.
1433 users' persisted data.
1424
1434
1425 * IPython/iplib.py (autoindent_update): move indentation
1435 * IPython/iplib.py (autoindent_update): move indentation
1426 management into the _text_ processing loop, not the keyboard
1436 management into the _text_ processing loop, not the keyboard
1427 interactive one. This is necessary to correctly process non-typed
1437 interactive one. This is necessary to correctly process non-typed
1428 multiline input (such as macros).
1438 multiline input (such as macros).
1429
1439
1430 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
1440 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
1431 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
1441 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
1432 which was producing problems in the resulting manual.
1442 which was producing problems in the resulting manual.
1433 (magic_whos): improve reporting of instances (show their class,
1443 (magic_whos): improve reporting of instances (show their class,
1434 instead of simply printing 'instance' which isn't terribly
1444 instead of simply printing 'instance' which isn't terribly
1435 informative).
1445 informative).
1436
1446
1437 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
1447 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
1438 (minor mods) to support network shares under win32.
1448 (minor mods) to support network shares under win32.
1439
1449
1440 * IPython/winconsole.py (get_console_size): add new winconsole
1450 * IPython/winconsole.py (get_console_size): add new winconsole
1441 module and fixes to page_dumb() to improve its behavior under
1451 module and fixes to page_dumb() to improve its behavior under
1442 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
1452 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
1443
1453
1444 * IPython/Magic.py (Macro): simplified Macro class to just
1454 * IPython/Magic.py (Macro): simplified Macro class to just
1445 subclass list. We've had only 2.2 compatibility for a very long
1455 subclass list. We've had only 2.2 compatibility for a very long
1446 time, yet I was still avoiding subclassing the builtin types. No
1456 time, yet I was still avoiding subclassing the builtin types. No
1447 more (I'm also starting to use properties, though I won't shift to
1457 more (I'm also starting to use properties, though I won't shift to
1448 2.3-specific features quite yet).
1458 2.3-specific features quite yet).
1449 (magic_store): added Ville's patch for lightweight variable
1459 (magic_store): added Ville's patch for lightweight variable
1450 persistence, after a request on the user list by Matt Wilkie
1460 persistence, after a request on the user list by Matt Wilkie
1451 <maphew-AT-gmail.com>. The new %store magic's docstring has full
1461 <maphew-AT-gmail.com>. The new %store magic's docstring has full
1452 details.
1462 details.
1453
1463
1454 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1464 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1455 changed the default logfile name from 'ipython.log' to
1465 changed the default logfile name from 'ipython.log' to
1456 'ipython_log.py'. These logs are real python files, and now that
1466 'ipython_log.py'. These logs are real python files, and now that
1457 we have much better multiline support, people are more likely to
1467 we have much better multiline support, people are more likely to
1458 want to use them as such. Might as well name them correctly.
1468 want to use them as such. Might as well name them correctly.
1459
1469
1460 * IPython/Magic.py: substantial cleanup. While we can't stop
1470 * IPython/Magic.py: substantial cleanup. While we can't stop
1461 using magics as mixins, due to the existing customizations 'out
1471 using magics as mixins, due to the existing customizations 'out
1462 there' which rely on the mixin naming conventions, at least I
1472 there' which rely on the mixin naming conventions, at least I
1463 cleaned out all cross-class name usage. So once we are OK with
1473 cleaned out all cross-class name usage. So once we are OK with
1464 breaking compatibility, the two systems can be separated.
1474 breaking compatibility, the two systems can be separated.
1465
1475
1466 * IPython/Logger.py: major cleanup. This one is NOT a mixin
1476 * IPython/Logger.py: major cleanup. This one is NOT a mixin
1467 anymore, and the class is a fair bit less hideous as well. New
1477 anymore, and the class is a fair bit less hideous as well. New
1468 features were also introduced: timestamping of input, and logging
1478 features were also introduced: timestamping of input, and logging
1469 of output results. These are user-visible with the -t and -o
1479 of output results. These are user-visible with the -t and -o
1470 options to %logstart. Closes
1480 options to %logstart. Closes
1471 http://www.scipy.net/roundup/ipython/issue11 and a request by
1481 http://www.scipy.net/roundup/ipython/issue11 and a request by
1472 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
1482 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
1473
1483
1474 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
1484 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
1475
1485
1476 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
1486 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
1477 better handle backslashes in paths. See the thread 'More Windows
1487 better handle backslashes in paths. See the thread 'More Windows
1478 questions part 2 - \/ characters revisited' on the iypthon user
1488 questions part 2 - \/ characters revisited' on the iypthon user
1479 list:
1489 list:
1480 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
1490 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
1481
1491
1482 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
1492 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
1483
1493
1484 (InteractiveShell.__init__): change threaded shells to not use the
1494 (InteractiveShell.__init__): change threaded shells to not use the
1485 ipython crash handler. This was causing more problems than not,
1495 ipython crash handler. This was causing more problems than not,
1486 as exceptions in the main thread (GUI code, typically) would
1496 as exceptions in the main thread (GUI code, typically) would
1487 always show up as a 'crash', when they really weren't.
1497 always show up as a 'crash', when they really weren't.
1488
1498
1489 The colors and exception mode commands (%colors/%xmode) have been
1499 The colors and exception mode commands (%colors/%xmode) have been
1490 synchronized to also take this into account, so users can get
1500 synchronized to also take this into account, so users can get
1491 verbose exceptions for their threaded code as well. I also added
1501 verbose exceptions for their threaded code as well. I also added
1492 support for activating pdb inside this exception handler as well,
1502 support for activating pdb inside this exception handler as well,
1493 so now GUI authors can use IPython's enhanced pdb at runtime.
1503 so now GUI authors can use IPython's enhanced pdb at runtime.
1494
1504
1495 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1505 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1496 true by default, and add it to the shipped ipythonrc file. Since
1506 true by default, and add it to the shipped ipythonrc file. Since
1497 this asks the user before proceeding, I think it's OK to make it
1507 this asks the user before proceeding, I think it's OK to make it
1498 true by default.
1508 true by default.
1499
1509
1500 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1510 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1501 of the previous special-casing of input in the eval loop. I think
1511 of the previous special-casing of input in the eval loop. I think
1502 this is cleaner, as they really are commands and shouldn't have
1512 this is cleaner, as they really are commands and shouldn't have
1503 a special role in the middle of the core code.
1513 a special role in the middle of the core code.
1504
1514
1505 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1515 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1506
1516
1507 * IPython/iplib.py (edit_syntax_error): added support for
1517 * IPython/iplib.py (edit_syntax_error): added support for
1508 automatically reopening the editor if the file had a syntax error
1518 automatically reopening the editor if the file had a syntax error
1509 in it. Thanks to scottt who provided the patch at:
1519 in it. Thanks to scottt who provided the patch at:
1510 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1520 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1511 version committed).
1521 version committed).
1512
1522
1513 * IPython/iplib.py (handle_normal): add suport for multi-line
1523 * IPython/iplib.py (handle_normal): add suport for multi-line
1514 input with emtpy lines. This fixes
1524 input with emtpy lines. This fixes
1515 http://www.scipy.net/roundup/ipython/issue43 and a similar
1525 http://www.scipy.net/roundup/ipython/issue43 and a similar
1516 discussion on the user list.
1526 discussion on the user list.
1517
1527
1518 WARNING: a behavior change is necessarily introduced to support
1528 WARNING: a behavior change is necessarily introduced to support
1519 blank lines: now a single blank line with whitespace does NOT
1529 blank lines: now a single blank line with whitespace does NOT
1520 break the input loop, which means that when autoindent is on, by
1530 break the input loop, which means that when autoindent is on, by
1521 default hitting return on the next (indented) line does NOT exit.
1531 default hitting return on the next (indented) line does NOT exit.
1522
1532
1523 Instead, to exit a multiline input you can either have:
1533 Instead, to exit a multiline input you can either have:
1524
1534
1525 - TWO whitespace lines (just hit return again), or
1535 - TWO whitespace lines (just hit return again), or
1526 - a single whitespace line of a different length than provided
1536 - a single whitespace line of a different length than provided
1527 by the autoindent (add or remove a space).
1537 by the autoindent (add or remove a space).
1528
1538
1529 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1539 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1530 module to better organize all readline-related functionality.
1540 module to better organize all readline-related functionality.
1531 I've deleted FlexCompleter and put all completion clases here.
1541 I've deleted FlexCompleter and put all completion clases here.
1532
1542
1533 * IPython/iplib.py (raw_input): improve indentation management.
1543 * IPython/iplib.py (raw_input): improve indentation management.
1534 It is now possible to paste indented code with autoindent on, and
1544 It is now possible to paste indented code with autoindent on, and
1535 the code is interpreted correctly (though it still looks bad on
1545 the code is interpreted correctly (though it still looks bad on
1536 screen, due to the line-oriented nature of ipython).
1546 screen, due to the line-oriented nature of ipython).
1537 (MagicCompleter.complete): change behavior so that a TAB key on an
1547 (MagicCompleter.complete): change behavior so that a TAB key on an
1538 otherwise empty line actually inserts a tab, instead of completing
1548 otherwise empty line actually inserts a tab, instead of completing
1539 on the entire global namespace. This makes it easier to use the
1549 on the entire global namespace. This makes it easier to use the
1540 TAB key for indentation. After a request by Hans Meine
1550 TAB key for indentation. After a request by Hans Meine
1541 <hans_meine-AT-gmx.net>
1551 <hans_meine-AT-gmx.net>
1542 (_prefilter): add support so that typing plain 'exit' or 'quit'
1552 (_prefilter): add support so that typing plain 'exit' or 'quit'
1543 does a sensible thing. Originally I tried to deviate as little as
1553 does a sensible thing. Originally I tried to deviate as little as
1544 possible from the default python behavior, but even that one may
1554 possible from the default python behavior, but even that one may
1545 change in this direction (thread on python-dev to that effect).
1555 change in this direction (thread on python-dev to that effect).
1546 Regardless, ipython should do the right thing even if CPython's
1556 Regardless, ipython should do the right thing even if CPython's
1547 '>>>' prompt doesn't.
1557 '>>>' prompt doesn't.
1548 (InteractiveShell): removed subclassing code.InteractiveConsole
1558 (InteractiveShell): removed subclassing code.InteractiveConsole
1549 class. By now we'd overridden just about all of its methods: I've
1559 class. By now we'd overridden just about all of its methods: I've
1550 copied the remaining two over, and now ipython is a standalone
1560 copied the remaining two over, and now ipython is a standalone
1551 class. This will provide a clearer picture for the chainsaw
1561 class. This will provide a clearer picture for the chainsaw
1552 branch refactoring.
1562 branch refactoring.
1553
1563
1554 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1564 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1555
1565
1556 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1566 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1557 failures for objects which break when dir() is called on them.
1567 failures for objects which break when dir() is called on them.
1558
1568
1559 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1569 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1560 distinct local and global namespaces in the completer API. This
1570 distinct local and global namespaces in the completer API. This
1561 change allows us to properly handle completion with distinct
1571 change allows us to properly handle completion with distinct
1562 scopes, including in embedded instances (this had never really
1572 scopes, including in embedded instances (this had never really
1563 worked correctly).
1573 worked correctly).
1564
1574
1565 Note: this introduces a change in the constructor for
1575 Note: this introduces a change in the constructor for
1566 MagicCompleter, as a new global_namespace parameter is now the
1576 MagicCompleter, as a new global_namespace parameter is now the
1567 second argument (the others were bumped one position).
1577 second argument (the others were bumped one position).
1568
1578
1569 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1579 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1570
1580
1571 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1581 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1572 embedded instances (which can be done now thanks to Vivian's
1582 embedded instances (which can be done now thanks to Vivian's
1573 frame-handling fixes for pdb).
1583 frame-handling fixes for pdb).
1574 (InteractiveShell.__init__): Fix namespace handling problem in
1584 (InteractiveShell.__init__): Fix namespace handling problem in
1575 embedded instances. We were overwriting __main__ unconditionally,
1585 embedded instances. We were overwriting __main__ unconditionally,
1576 and this should only be done for 'full' (non-embedded) IPython;
1586 and this should only be done for 'full' (non-embedded) IPython;
1577 embedded instances must respect the caller's __main__. Thanks to
1587 embedded instances must respect the caller's __main__. Thanks to
1578 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1588 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1579
1589
1580 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1590 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1581
1591
1582 * setup.py: added download_url to setup(). This registers the
1592 * setup.py: added download_url to setup(). This registers the
1583 download address at PyPI, which is not only useful to humans
1593 download address at PyPI, which is not only useful to humans
1584 browsing the site, but is also picked up by setuptools (the Eggs
1594 browsing the site, but is also picked up by setuptools (the Eggs
1585 machinery). Thanks to Ville and R. Kern for the info/discussion
1595 machinery). Thanks to Ville and R. Kern for the info/discussion
1586 on this.
1596 on this.
1587
1597
1588 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1598 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1589
1599
1590 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1600 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1591 This brings a lot of nice functionality to the pdb mode, which now
1601 This brings a lot of nice functionality to the pdb mode, which now
1592 has tab-completion, syntax highlighting, and better stack handling
1602 has tab-completion, syntax highlighting, and better stack handling
1593 than before. Many thanks to Vivian De Smedt
1603 than before. Many thanks to Vivian De Smedt
1594 <vivian-AT-vdesmedt.com> for the original patches.
1604 <vivian-AT-vdesmedt.com> for the original patches.
1595
1605
1596 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1606 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1597
1607
1598 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1608 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1599 sequence to consistently accept the banner argument. The
1609 sequence to consistently accept the banner argument. The
1600 inconsistency was tripping SAGE, thanks to Gary Zablackis
1610 inconsistency was tripping SAGE, thanks to Gary Zablackis
1601 <gzabl-AT-yahoo.com> for the report.
1611 <gzabl-AT-yahoo.com> for the report.
1602
1612
1603 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1613 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1604
1614
1605 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1615 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1606 Fix bug where a naked 'alias' call in the ipythonrc file would
1616 Fix bug where a naked 'alias' call in the ipythonrc file would
1607 cause a crash. Bug reported by Jorgen Stenarson.
1617 cause a crash. Bug reported by Jorgen Stenarson.
1608
1618
1609 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1619 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1610
1620
1611 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1621 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1612 startup time.
1622 startup time.
1613
1623
1614 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1624 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1615 instances had introduced a bug with globals in normal code. Now
1625 instances had introduced a bug with globals in normal code. Now
1616 it's working in all cases.
1626 it's working in all cases.
1617
1627
1618 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1628 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1619 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1629 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1620 has been introduced to set the default case sensitivity of the
1630 has been introduced to set the default case sensitivity of the
1621 searches. Users can still select either mode at runtime on a
1631 searches. Users can still select either mode at runtime on a
1622 per-search basis.
1632 per-search basis.
1623
1633
1624 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1634 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1625
1635
1626 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1636 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1627 attributes in wildcard searches for subclasses. Modified version
1637 attributes in wildcard searches for subclasses. Modified version
1628 of a patch by Jorgen.
1638 of a patch by Jorgen.
1629
1639
1630 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1640 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1631
1641
1632 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1642 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1633 embedded instances. I added a user_global_ns attribute to the
1643 embedded instances. I added a user_global_ns attribute to the
1634 InteractiveShell class to handle this.
1644 InteractiveShell class to handle this.
1635
1645
1636 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1646 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1637
1647
1638 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1648 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1639 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1649 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1640 (reported under win32, but may happen also in other platforms).
1650 (reported under win32, but may happen also in other platforms).
1641 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1651 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1642
1652
1643 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1653 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1644
1654
1645 * IPython/Magic.py (magic_psearch): new support for wildcard
1655 * IPython/Magic.py (magic_psearch): new support for wildcard
1646 patterns. Now, typing ?a*b will list all names which begin with a
1656 patterns. Now, typing ?a*b will list all names which begin with a
1647 and end in b, for example. The %psearch magic has full
1657 and end in b, for example. The %psearch magic has full
1648 docstrings. Many thanks to JΓΆrgen Stenarson
1658 docstrings. Many thanks to JΓΆrgen Stenarson
1649 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1659 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1650 implementing this functionality.
1660 implementing this functionality.
1651
1661
1652 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1662 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1653
1663
1654 * Manual: fixed long-standing annoyance of double-dashes (as in
1664 * Manual: fixed long-standing annoyance of double-dashes (as in
1655 --prefix=~, for example) being stripped in the HTML version. This
1665 --prefix=~, for example) being stripped in the HTML version. This
1656 is a latex2html bug, but a workaround was provided. Many thanks
1666 is a latex2html bug, but a workaround was provided. Many thanks
1657 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1667 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1658 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1668 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1659 rolling. This seemingly small issue had tripped a number of users
1669 rolling. This seemingly small issue had tripped a number of users
1660 when first installing, so I'm glad to see it gone.
1670 when first installing, so I'm glad to see it gone.
1661
1671
1662 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1672 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1663
1673
1664 * IPython/Extensions/numeric_formats.py: fix missing import,
1674 * IPython/Extensions/numeric_formats.py: fix missing import,
1665 reported by Stephen Walton.
1675 reported by Stephen Walton.
1666
1676
1667 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1677 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1668
1678
1669 * IPython/demo.py: finish demo module, fully documented now.
1679 * IPython/demo.py: finish demo module, fully documented now.
1670
1680
1671 * IPython/genutils.py (file_read): simple little utility to read a
1681 * IPython/genutils.py (file_read): simple little utility to read a
1672 file and ensure it's closed afterwards.
1682 file and ensure it's closed afterwards.
1673
1683
1674 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1684 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1675
1685
1676 * IPython/demo.py (Demo.__init__): added support for individually
1686 * IPython/demo.py (Demo.__init__): added support for individually
1677 tagging blocks for automatic execution.
1687 tagging blocks for automatic execution.
1678
1688
1679 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1689 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1680 syntax-highlighted python sources, requested by John.
1690 syntax-highlighted python sources, requested by John.
1681
1691
1682 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1692 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1683
1693
1684 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1694 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1685 finishing.
1695 finishing.
1686
1696
1687 * IPython/genutils.py (shlex_split): moved from Magic to here,
1697 * IPython/genutils.py (shlex_split): moved from Magic to here,
1688 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1698 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1689
1699
1690 * IPython/demo.py (Demo.__init__): added support for silent
1700 * IPython/demo.py (Demo.__init__): added support for silent
1691 blocks, improved marks as regexps, docstrings written.
1701 blocks, improved marks as regexps, docstrings written.
1692 (Demo.__init__): better docstring, added support for sys.argv.
1702 (Demo.__init__): better docstring, added support for sys.argv.
1693
1703
1694 * IPython/genutils.py (marquee): little utility used by the demo
1704 * IPython/genutils.py (marquee): little utility used by the demo
1695 code, handy in general.
1705 code, handy in general.
1696
1706
1697 * IPython/demo.py (Demo.__init__): new class for interactive
1707 * IPython/demo.py (Demo.__init__): new class for interactive
1698 demos. Not documented yet, I just wrote it in a hurry for
1708 demos. Not documented yet, I just wrote it in a hurry for
1699 scipy'05. Will docstring later.
1709 scipy'05. Will docstring later.
1700
1710
1701 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1711 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1702
1712
1703 * IPython/Shell.py (sigint_handler): Drastic simplification which
1713 * IPython/Shell.py (sigint_handler): Drastic simplification which
1704 also seems to make Ctrl-C work correctly across threads! This is
1714 also seems to make Ctrl-C work correctly across threads! This is
1705 so simple, that I can't beleive I'd missed it before. Needs more
1715 so simple, that I can't beleive I'd missed it before. Needs more
1706 testing, though.
1716 testing, though.
1707 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1717 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1708 like this before...
1718 like this before...
1709
1719
1710 * IPython/genutils.py (get_home_dir): add protection against
1720 * IPython/genutils.py (get_home_dir): add protection against
1711 non-dirs in win32 registry.
1721 non-dirs in win32 registry.
1712
1722
1713 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1723 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1714 bug where dict was mutated while iterating (pysh crash).
1724 bug where dict was mutated while iterating (pysh crash).
1715
1725
1716 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1726 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1717
1727
1718 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1728 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1719 spurious newlines added by this routine. After a report by
1729 spurious newlines added by this routine. After a report by
1720 F. Mantegazza.
1730 F. Mantegazza.
1721
1731
1722 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1732 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1723
1733
1724 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1734 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1725 calls. These were a leftover from the GTK 1.x days, and can cause
1735 calls. These were a leftover from the GTK 1.x days, and can cause
1726 problems in certain cases (after a report by John Hunter).
1736 problems in certain cases (after a report by John Hunter).
1727
1737
1728 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1738 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1729 os.getcwd() fails at init time. Thanks to patch from David Remahl
1739 os.getcwd() fails at init time. Thanks to patch from David Remahl
1730 <chmod007-AT-mac.com>.
1740 <chmod007-AT-mac.com>.
1731 (InteractiveShell.__init__): prevent certain special magics from
1741 (InteractiveShell.__init__): prevent certain special magics from
1732 being shadowed by aliases. Closes
1742 being shadowed by aliases. Closes
1733 http://www.scipy.net/roundup/ipython/issue41.
1743 http://www.scipy.net/roundup/ipython/issue41.
1734
1744
1735 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1745 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1736
1746
1737 * IPython/iplib.py (InteractiveShell.complete): Added new
1747 * IPython/iplib.py (InteractiveShell.complete): Added new
1738 top-level completion method to expose the completion mechanism
1748 top-level completion method to expose the completion mechanism
1739 beyond readline-based environments.
1749 beyond readline-based environments.
1740
1750
1741 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1751 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1742
1752
1743 * tools/ipsvnc (svnversion): fix svnversion capture.
1753 * tools/ipsvnc (svnversion): fix svnversion capture.
1744
1754
1745 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1755 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1746 attribute to self, which was missing. Before, it was set by a
1756 attribute to self, which was missing. Before, it was set by a
1747 routine which in certain cases wasn't being called, so the
1757 routine which in certain cases wasn't being called, so the
1748 instance could end up missing the attribute. This caused a crash.
1758 instance could end up missing the attribute. This caused a crash.
1749 Closes http://www.scipy.net/roundup/ipython/issue40.
1759 Closes http://www.scipy.net/roundup/ipython/issue40.
1750
1760
1751 2005-08-16 Fernando Perez <fperez@colorado.edu>
1761 2005-08-16 Fernando Perez <fperez@colorado.edu>
1752
1762
1753 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1763 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1754 contains non-string attribute. Closes
1764 contains non-string attribute. Closes
1755 http://www.scipy.net/roundup/ipython/issue38.
1765 http://www.scipy.net/roundup/ipython/issue38.
1756
1766
1757 2005-08-14 Fernando Perez <fperez@colorado.edu>
1767 2005-08-14 Fernando Perez <fperez@colorado.edu>
1758
1768
1759 * tools/ipsvnc: Minor improvements, to add changeset info.
1769 * tools/ipsvnc: Minor improvements, to add changeset info.
1760
1770
1761 2005-08-12 Fernando Perez <fperez@colorado.edu>
1771 2005-08-12 Fernando Perez <fperez@colorado.edu>
1762
1772
1763 * IPython/iplib.py (runsource): remove self.code_to_run_src
1773 * IPython/iplib.py (runsource): remove self.code_to_run_src
1764 attribute. I realized this is nothing more than
1774 attribute. I realized this is nothing more than
1765 '\n'.join(self.buffer), and having the same data in two different
1775 '\n'.join(self.buffer), and having the same data in two different
1766 places is just asking for synchronization bugs. This may impact
1776 places is just asking for synchronization bugs. This may impact
1767 people who have custom exception handlers, so I need to warn
1777 people who have custom exception handlers, so I need to warn
1768 ipython-dev about it (F. Mantegazza may use them).
1778 ipython-dev about it (F. Mantegazza may use them).
1769
1779
1770 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1780 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1771
1781
1772 * IPython/genutils.py: fix 2.2 compatibility (generators)
1782 * IPython/genutils.py: fix 2.2 compatibility (generators)
1773
1783
1774 2005-07-18 Fernando Perez <fperez@colorado.edu>
1784 2005-07-18 Fernando Perez <fperez@colorado.edu>
1775
1785
1776 * IPython/genutils.py (get_home_dir): fix to help users with
1786 * IPython/genutils.py (get_home_dir): fix to help users with
1777 invalid $HOME under win32.
1787 invalid $HOME under win32.
1778
1788
1779 2005-07-17 Fernando Perez <fperez@colorado.edu>
1789 2005-07-17 Fernando Perez <fperez@colorado.edu>
1780
1790
1781 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1791 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1782 some old hacks and clean up a bit other routines; code should be
1792 some old hacks and clean up a bit other routines; code should be
1783 simpler and a bit faster.
1793 simpler and a bit faster.
1784
1794
1785 * IPython/iplib.py (interact): removed some last-resort attempts
1795 * IPython/iplib.py (interact): removed some last-resort attempts
1786 to survive broken stdout/stderr. That code was only making it
1796 to survive broken stdout/stderr. That code was only making it
1787 harder to abstract out the i/o (necessary for gui integration),
1797 harder to abstract out the i/o (necessary for gui integration),
1788 and the crashes it could prevent were extremely rare in practice
1798 and the crashes it could prevent were extremely rare in practice
1789 (besides being fully user-induced in a pretty violent manner).
1799 (besides being fully user-induced in a pretty violent manner).
1790
1800
1791 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1801 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1792 Nothing major yet, but the code is simpler to read; this should
1802 Nothing major yet, but the code is simpler to read; this should
1793 make it easier to do more serious modifications in the future.
1803 make it easier to do more serious modifications in the future.
1794
1804
1795 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1805 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1796 which broke in .15 (thanks to a report by Ville).
1806 which broke in .15 (thanks to a report by Ville).
1797
1807
1798 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1808 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1799 be quite correct, I know next to nothing about unicode). This
1809 be quite correct, I know next to nothing about unicode). This
1800 will allow unicode strings to be used in prompts, amongst other
1810 will allow unicode strings to be used in prompts, amongst other
1801 cases. It also will prevent ipython from crashing when unicode
1811 cases. It also will prevent ipython from crashing when unicode
1802 shows up unexpectedly in many places. If ascii encoding fails, we
1812 shows up unexpectedly in many places. If ascii encoding fails, we
1803 assume utf_8. Currently the encoding is not a user-visible
1813 assume utf_8. Currently the encoding is not a user-visible
1804 setting, though it could be made so if there is demand for it.
1814 setting, though it could be made so if there is demand for it.
1805
1815
1806 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1816 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1807
1817
1808 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1818 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1809
1819
1810 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1820 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1811
1821
1812 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1822 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1813 code can work transparently for 2.2/2.3.
1823 code can work transparently for 2.2/2.3.
1814
1824
1815 2005-07-16 Fernando Perez <fperez@colorado.edu>
1825 2005-07-16 Fernando Perez <fperez@colorado.edu>
1816
1826
1817 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1827 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1818 out of the color scheme table used for coloring exception
1828 out of the color scheme table used for coloring exception
1819 tracebacks. This allows user code to add new schemes at runtime.
1829 tracebacks. This allows user code to add new schemes at runtime.
1820 This is a minimally modified version of the patch at
1830 This is a minimally modified version of the patch at
1821 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1831 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1822 for the contribution.
1832 for the contribution.
1823
1833
1824 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1834 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1825 slightly modified version of the patch in
1835 slightly modified version of the patch in
1826 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1836 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1827 to remove the previous try/except solution (which was costlier).
1837 to remove the previous try/except solution (which was costlier).
1828 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1838 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1829
1839
1830 2005-06-08 Fernando Perez <fperez@colorado.edu>
1840 2005-06-08 Fernando Perez <fperez@colorado.edu>
1831
1841
1832 * IPython/iplib.py (write/write_err): Add methods to abstract all
1842 * IPython/iplib.py (write/write_err): Add methods to abstract all
1833 I/O a bit more.
1843 I/O a bit more.
1834
1844
1835 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1845 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1836 warning, reported by Aric Hagberg, fix by JD Hunter.
1846 warning, reported by Aric Hagberg, fix by JD Hunter.
1837
1847
1838 2005-06-02 *** Released version 0.6.15
1848 2005-06-02 *** Released version 0.6.15
1839
1849
1840 2005-06-01 Fernando Perez <fperez@colorado.edu>
1850 2005-06-01 Fernando Perez <fperez@colorado.edu>
1841
1851
1842 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1852 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1843 tab-completion of filenames within open-quoted strings. Note that
1853 tab-completion of filenames within open-quoted strings. Note that
1844 this requires that in ~/.ipython/ipythonrc, users change the
1854 this requires that in ~/.ipython/ipythonrc, users change the
1845 readline delimiters configuration to read:
1855 readline delimiters configuration to read:
1846
1856
1847 readline_remove_delims -/~
1857 readline_remove_delims -/~
1848
1858
1849
1859
1850 2005-05-31 *** Released version 0.6.14
1860 2005-05-31 *** Released version 0.6.14
1851
1861
1852 2005-05-29 Fernando Perez <fperez@colorado.edu>
1862 2005-05-29 Fernando Perez <fperez@colorado.edu>
1853
1863
1854 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1864 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1855 with files not on the filesystem. Reported by Eliyahu Sandler
1865 with files not on the filesystem. Reported by Eliyahu Sandler
1856 <eli@gondolin.net>
1866 <eli@gondolin.net>
1857
1867
1858 2005-05-22 Fernando Perez <fperez@colorado.edu>
1868 2005-05-22 Fernando Perez <fperez@colorado.edu>
1859
1869
1860 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1870 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1861 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1871 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1862
1872
1863 2005-05-19 Fernando Perez <fperez@colorado.edu>
1873 2005-05-19 Fernando Perez <fperez@colorado.edu>
1864
1874
1865 * IPython/iplib.py (safe_execfile): close a file which could be
1875 * IPython/iplib.py (safe_execfile): close a file which could be
1866 left open (causing problems in win32, which locks open files).
1876 left open (causing problems in win32, which locks open files).
1867 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1877 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1868
1878
1869 2005-05-18 Fernando Perez <fperez@colorado.edu>
1879 2005-05-18 Fernando Perez <fperez@colorado.edu>
1870
1880
1871 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1881 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1872 keyword arguments correctly to safe_execfile().
1882 keyword arguments correctly to safe_execfile().
1873
1883
1874 2005-05-13 Fernando Perez <fperez@colorado.edu>
1884 2005-05-13 Fernando Perez <fperez@colorado.edu>
1875
1885
1876 * ipython.1: Added info about Qt to manpage, and threads warning
1886 * ipython.1: Added info about Qt to manpage, and threads warning
1877 to usage page (invoked with --help).
1887 to usage page (invoked with --help).
1878
1888
1879 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1889 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1880 new matcher (it goes at the end of the priority list) to do
1890 new matcher (it goes at the end of the priority list) to do
1881 tab-completion on named function arguments. Submitted by George
1891 tab-completion on named function arguments. Submitted by George
1882 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1892 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1883 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1893 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1884 for more details.
1894 for more details.
1885
1895
1886 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1896 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1887 SystemExit exceptions in the script being run. Thanks to a report
1897 SystemExit exceptions in the script being run. Thanks to a report
1888 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1898 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1889 producing very annoying behavior when running unit tests.
1899 producing very annoying behavior when running unit tests.
1890
1900
1891 2005-05-12 Fernando Perez <fperez@colorado.edu>
1901 2005-05-12 Fernando Perez <fperez@colorado.edu>
1892
1902
1893 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1903 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1894 which I'd broken (again) due to a changed regexp. In the process,
1904 which I'd broken (again) due to a changed regexp. In the process,
1895 added ';' as an escape to auto-quote the whole line without
1905 added ';' as an escape to auto-quote the whole line without
1896 splitting its arguments. Thanks to a report by Jerry McRae
1906 splitting its arguments. Thanks to a report by Jerry McRae
1897 <qrs0xyc02-AT-sneakemail.com>.
1907 <qrs0xyc02-AT-sneakemail.com>.
1898
1908
1899 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1909 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1900 possible crashes caused by a TokenError. Reported by Ed Schofield
1910 possible crashes caused by a TokenError. Reported by Ed Schofield
1901 <schofield-AT-ftw.at>.
1911 <schofield-AT-ftw.at>.
1902
1912
1903 2005-05-06 Fernando Perez <fperez@colorado.edu>
1913 2005-05-06 Fernando Perez <fperez@colorado.edu>
1904
1914
1905 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1915 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1906
1916
1907 2005-04-29 Fernando Perez <fperez@colorado.edu>
1917 2005-04-29 Fernando Perez <fperez@colorado.edu>
1908
1918
1909 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1919 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1910 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1920 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1911 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1921 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1912 which provides support for Qt interactive usage (similar to the
1922 which provides support for Qt interactive usage (similar to the
1913 existing one for WX and GTK). This had been often requested.
1923 existing one for WX and GTK). This had been often requested.
1914
1924
1915 2005-04-14 *** Released version 0.6.13
1925 2005-04-14 *** Released version 0.6.13
1916
1926
1917 2005-04-08 Fernando Perez <fperez@colorado.edu>
1927 2005-04-08 Fernando Perez <fperez@colorado.edu>
1918
1928
1919 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1929 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1920 from _ofind, which gets called on almost every input line. Now,
1930 from _ofind, which gets called on almost every input line. Now,
1921 we only try to get docstrings if they are actually going to be
1931 we only try to get docstrings if they are actually going to be
1922 used (the overhead of fetching unnecessary docstrings can be
1932 used (the overhead of fetching unnecessary docstrings can be
1923 noticeable for certain objects, such as Pyro proxies).
1933 noticeable for certain objects, such as Pyro proxies).
1924
1934
1925 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1935 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1926 for completers. For some reason I had been passing them the state
1936 for completers. For some reason I had been passing them the state
1927 variable, which completers never actually need, and was in
1937 variable, which completers never actually need, and was in
1928 conflict with the rlcompleter API. Custom completers ONLY need to
1938 conflict with the rlcompleter API. Custom completers ONLY need to
1929 take the text parameter.
1939 take the text parameter.
1930
1940
1931 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1941 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1932 work correctly in pysh. I've also moved all the logic which used
1942 work correctly in pysh. I've also moved all the logic which used
1933 to be in pysh.py here, which will prevent problems with future
1943 to be in pysh.py here, which will prevent problems with future
1934 upgrades. However, this time I must warn users to update their
1944 upgrades. However, this time I must warn users to update their
1935 pysh profile to include the line
1945 pysh profile to include the line
1936
1946
1937 import_all IPython.Extensions.InterpreterExec
1947 import_all IPython.Extensions.InterpreterExec
1938
1948
1939 because otherwise things won't work for them. They MUST also
1949 because otherwise things won't work for them. They MUST also
1940 delete pysh.py and the line
1950 delete pysh.py and the line
1941
1951
1942 execfile pysh.py
1952 execfile pysh.py
1943
1953
1944 from their ipythonrc-pysh.
1954 from their ipythonrc-pysh.
1945
1955
1946 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1956 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1947 robust in the face of objects whose dir() returns non-strings
1957 robust in the face of objects whose dir() returns non-strings
1948 (which it shouldn't, but some broken libs like ITK do). Thanks to
1958 (which it shouldn't, but some broken libs like ITK do). Thanks to
1949 a patch by John Hunter (implemented differently, though). Also
1959 a patch by John Hunter (implemented differently, though). Also
1950 minor improvements by using .extend instead of + on lists.
1960 minor improvements by using .extend instead of + on lists.
1951
1961
1952 * pysh.py:
1962 * pysh.py:
1953
1963
1954 2005-04-06 Fernando Perez <fperez@colorado.edu>
1964 2005-04-06 Fernando Perez <fperez@colorado.edu>
1955
1965
1956 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1966 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1957 by default, so that all users benefit from it. Those who don't
1967 by default, so that all users benefit from it. Those who don't
1958 want it can still turn it off.
1968 want it can still turn it off.
1959
1969
1960 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1970 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1961 config file, I'd forgotten about this, so users were getting it
1971 config file, I'd forgotten about this, so users were getting it
1962 off by default.
1972 off by default.
1963
1973
1964 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1974 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1965 consistency. Now magics can be called in multiline statements,
1975 consistency. Now magics can be called in multiline statements,
1966 and python variables can be expanded in magic calls via $var.
1976 and python variables can be expanded in magic calls via $var.
1967 This makes the magic system behave just like aliases or !system
1977 This makes the magic system behave just like aliases or !system
1968 calls.
1978 calls.
1969
1979
1970 2005-03-28 Fernando Perez <fperez@colorado.edu>
1980 2005-03-28 Fernando Perez <fperez@colorado.edu>
1971
1981
1972 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1982 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1973 expensive string additions for building command. Add support for
1983 expensive string additions for building command. Add support for
1974 trailing ';' when autocall is used.
1984 trailing ';' when autocall is used.
1975
1985
1976 2005-03-26 Fernando Perez <fperez@colorado.edu>
1986 2005-03-26 Fernando Perez <fperez@colorado.edu>
1977
1987
1978 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1988 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1979 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1989 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1980 ipython.el robust against prompts with any number of spaces
1990 ipython.el robust against prompts with any number of spaces
1981 (including 0) after the ':' character.
1991 (including 0) after the ':' character.
1982
1992
1983 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1993 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1984 continuation prompt, which misled users to think the line was
1994 continuation prompt, which misled users to think the line was
1985 already indented. Closes debian Bug#300847, reported to me by
1995 already indented. Closes debian Bug#300847, reported to me by
1986 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1996 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1987
1997
1988 2005-03-23 Fernando Perez <fperez@colorado.edu>
1998 2005-03-23 Fernando Perez <fperez@colorado.edu>
1989
1999
1990 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
2000 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1991 properly aligned if they have embedded newlines.
2001 properly aligned if they have embedded newlines.
1992
2002
1993 * IPython/iplib.py (runlines): Add a public method to expose
2003 * IPython/iplib.py (runlines): Add a public method to expose
1994 IPython's code execution machinery, so that users can run strings
2004 IPython's code execution machinery, so that users can run strings
1995 as if they had been typed at the prompt interactively.
2005 as if they had been typed at the prompt interactively.
1996 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
2006 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1997 methods which can call the system shell, but with python variable
2007 methods which can call the system shell, but with python variable
1998 expansion. The three such methods are: __IPYTHON__.system,
2008 expansion. The three such methods are: __IPYTHON__.system,
1999 .getoutput and .getoutputerror. These need to be documented in a
2009 .getoutput and .getoutputerror. These need to be documented in a
2000 'public API' section (to be written) of the manual.
2010 'public API' section (to be written) of the manual.
2001
2011
2002 2005-03-20 Fernando Perez <fperez@colorado.edu>
2012 2005-03-20 Fernando Perez <fperez@colorado.edu>
2003
2013
2004 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
2014 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
2005 for custom exception handling. This is quite powerful, and it
2015 for custom exception handling. This is quite powerful, and it
2006 allows for user-installable exception handlers which can trap
2016 allows for user-installable exception handlers which can trap
2007 custom exceptions at runtime and treat them separately from
2017 custom exceptions at runtime and treat them separately from
2008 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
2018 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
2009 Mantegazza <mantegazza-AT-ill.fr>.
2019 Mantegazza <mantegazza-AT-ill.fr>.
2010 (InteractiveShell.set_custom_completer): public API function to
2020 (InteractiveShell.set_custom_completer): public API function to
2011 add new completers at runtime.
2021 add new completers at runtime.
2012
2022
2013 2005-03-19 Fernando Perez <fperez@colorado.edu>
2023 2005-03-19 Fernando Perez <fperez@colorado.edu>
2014
2024
2015 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
2025 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
2016 allow objects which provide their docstrings via non-standard
2026 allow objects which provide their docstrings via non-standard
2017 mechanisms (like Pyro proxies) to still be inspected by ipython's
2027 mechanisms (like Pyro proxies) to still be inspected by ipython's
2018 ? system.
2028 ? system.
2019
2029
2020 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
2030 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
2021 automatic capture system. I tried quite hard to make it work
2031 automatic capture system. I tried quite hard to make it work
2022 reliably, and simply failed. I tried many combinations with the
2032 reliably, and simply failed. I tried many combinations with the
2023 subprocess module, but eventually nothing worked in all needed
2033 subprocess module, but eventually nothing worked in all needed
2024 cases (not blocking stdin for the child, duplicating stdout
2034 cases (not blocking stdin for the child, duplicating stdout
2025 without blocking, etc). The new %sc/%sx still do capture to these
2035 without blocking, etc). The new %sc/%sx still do capture to these
2026 magical list/string objects which make shell use much more
2036 magical list/string objects which make shell use much more
2027 conveninent, so not all is lost.
2037 conveninent, so not all is lost.
2028
2038
2029 XXX - FIX MANUAL for the change above!
2039 XXX - FIX MANUAL for the change above!
2030
2040
2031 (runsource): I copied code.py's runsource() into ipython to modify
2041 (runsource): I copied code.py's runsource() into ipython to modify
2032 it a bit. Now the code object and source to be executed are
2042 it a bit. Now the code object and source to be executed are
2033 stored in ipython. This makes this info accessible to third-party
2043 stored in ipython. This makes this info accessible to third-party
2034 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
2044 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
2035 Mantegazza <mantegazza-AT-ill.fr>.
2045 Mantegazza <mantegazza-AT-ill.fr>.
2036
2046
2037 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
2047 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
2038 history-search via readline (like C-p/C-n). I'd wanted this for a
2048 history-search via readline (like C-p/C-n). I'd wanted this for a
2039 long time, but only recently found out how to do it. For users
2049 long time, but only recently found out how to do it. For users
2040 who already have their ipythonrc files made and want this, just
2050 who already have their ipythonrc files made and want this, just
2041 add:
2051 add:
2042
2052
2043 readline_parse_and_bind "\e[A": history-search-backward
2053 readline_parse_and_bind "\e[A": history-search-backward
2044 readline_parse_and_bind "\e[B": history-search-forward
2054 readline_parse_and_bind "\e[B": history-search-forward
2045
2055
2046 2005-03-18 Fernando Perez <fperez@colorado.edu>
2056 2005-03-18 Fernando Perez <fperez@colorado.edu>
2047
2057
2048 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
2058 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
2049 LSString and SList classes which allow transparent conversions
2059 LSString and SList classes which allow transparent conversions
2050 between list mode and whitespace-separated string.
2060 between list mode and whitespace-separated string.
2051 (magic_r): Fix recursion problem in %r.
2061 (magic_r): Fix recursion problem in %r.
2052
2062
2053 * IPython/genutils.py (LSString): New class to be used for
2063 * IPython/genutils.py (LSString): New class to be used for
2054 automatic storage of the results of all alias/system calls in _o
2064 automatic storage of the results of all alias/system calls in _o
2055 and _e (stdout/err). These provide a .l/.list attribute which
2065 and _e (stdout/err). These provide a .l/.list attribute which
2056 does automatic splitting on newlines. This means that for most
2066 does automatic splitting on newlines. This means that for most
2057 uses, you'll never need to do capturing of output with %sc/%sx
2067 uses, you'll never need to do capturing of output with %sc/%sx
2058 anymore, since ipython keeps this always done for you. Note that
2068 anymore, since ipython keeps this always done for you. Note that
2059 only the LAST results are stored, the _o/e variables are
2069 only the LAST results are stored, the _o/e variables are
2060 overwritten on each call. If you need to save their contents
2070 overwritten on each call. If you need to save their contents
2061 further, simply bind them to any other name.
2071 further, simply bind them to any other name.
2062
2072
2063 2005-03-17 Fernando Perez <fperez@colorado.edu>
2073 2005-03-17 Fernando Perez <fperez@colorado.edu>
2064
2074
2065 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
2075 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
2066 prompt namespace handling.
2076 prompt namespace handling.
2067
2077
2068 2005-03-16 Fernando Perez <fperez@colorado.edu>
2078 2005-03-16 Fernando Perez <fperez@colorado.edu>
2069
2079
2070 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
2080 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
2071 classic prompts to be '>>> ' (final space was missing, and it
2081 classic prompts to be '>>> ' (final space was missing, and it
2072 trips the emacs python mode).
2082 trips the emacs python mode).
2073 (BasePrompt.__str__): Added safe support for dynamic prompt
2083 (BasePrompt.__str__): Added safe support for dynamic prompt
2074 strings. Now you can set your prompt string to be '$x', and the
2084 strings. Now you can set your prompt string to be '$x', and the
2075 value of x will be printed from your interactive namespace. The
2085 value of x will be printed from your interactive namespace. The
2076 interpolation syntax includes the full Itpl support, so
2086 interpolation syntax includes the full Itpl support, so
2077 ${foo()+x+bar()} is a valid prompt string now, and the function
2087 ${foo()+x+bar()} is a valid prompt string now, and the function
2078 calls will be made at runtime.
2088 calls will be made at runtime.
2079
2089
2080 2005-03-15 Fernando Perez <fperez@colorado.edu>
2090 2005-03-15 Fernando Perez <fperez@colorado.edu>
2081
2091
2082 * IPython/Magic.py (magic_history): renamed %hist to %history, to
2092 * IPython/Magic.py (magic_history): renamed %hist to %history, to
2083 avoid name clashes in pylab. %hist still works, it just forwards
2093 avoid name clashes in pylab. %hist still works, it just forwards
2084 the call to %history.
2094 the call to %history.
2085
2095
2086 2005-03-02 *** Released version 0.6.12
2096 2005-03-02 *** Released version 0.6.12
2087
2097
2088 2005-03-02 Fernando Perez <fperez@colorado.edu>
2098 2005-03-02 Fernando Perez <fperez@colorado.edu>
2089
2099
2090 * IPython/iplib.py (handle_magic): log magic calls properly as
2100 * IPython/iplib.py (handle_magic): log magic calls properly as
2091 ipmagic() function calls.
2101 ipmagic() function calls.
2092
2102
2093 * IPython/Magic.py (magic_time): Improved %time to support
2103 * IPython/Magic.py (magic_time): Improved %time to support
2094 statements and provide wall-clock as well as CPU time.
2104 statements and provide wall-clock as well as CPU time.
2095
2105
2096 2005-02-27 Fernando Perez <fperez@colorado.edu>
2106 2005-02-27 Fernando Perez <fperez@colorado.edu>
2097
2107
2098 * IPython/hooks.py: New hooks module, to expose user-modifiable
2108 * IPython/hooks.py: New hooks module, to expose user-modifiable
2099 IPython functionality in a clean manner. For now only the editor
2109 IPython functionality in a clean manner. For now only the editor
2100 hook is actually written, and other thigns which I intend to turn
2110 hook is actually written, and other thigns which I intend to turn
2101 into proper hooks aren't yet there. The display and prefilter
2111 into proper hooks aren't yet there. The display and prefilter
2102 stuff, for example, should be hooks. But at least now the
2112 stuff, for example, should be hooks. But at least now the
2103 framework is in place, and the rest can be moved here with more
2113 framework is in place, and the rest can be moved here with more
2104 time later. IPython had had a .hooks variable for a long time for
2114 time later. IPython had had a .hooks variable for a long time for
2105 this purpose, but I'd never actually used it for anything.
2115 this purpose, but I'd never actually used it for anything.
2106
2116
2107 2005-02-26 Fernando Perez <fperez@colorado.edu>
2117 2005-02-26 Fernando Perez <fperez@colorado.edu>
2108
2118
2109 * IPython/ipmaker.py (make_IPython): make the default ipython
2119 * IPython/ipmaker.py (make_IPython): make the default ipython
2110 directory be called _ipython under win32, to follow more the
2120 directory be called _ipython under win32, to follow more the
2111 naming peculiarities of that platform (where buggy software like
2121 naming peculiarities of that platform (where buggy software like
2112 Visual Sourcesafe breaks with .named directories). Reported by
2122 Visual Sourcesafe breaks with .named directories). Reported by
2113 Ville Vainio.
2123 Ville Vainio.
2114
2124
2115 2005-02-23 Fernando Perez <fperez@colorado.edu>
2125 2005-02-23 Fernando Perez <fperez@colorado.edu>
2116
2126
2117 * IPython/iplib.py (InteractiveShell.__init__): removed a few
2127 * IPython/iplib.py (InteractiveShell.__init__): removed a few
2118 auto_aliases for win32 which were causing problems. Users can
2128 auto_aliases for win32 which were causing problems. Users can
2119 define the ones they personally like.
2129 define the ones they personally like.
2120
2130
2121 2005-02-21 Fernando Perez <fperez@colorado.edu>
2131 2005-02-21 Fernando Perez <fperez@colorado.edu>
2122
2132
2123 * IPython/Magic.py (magic_time): new magic to time execution of
2133 * IPython/Magic.py (magic_time): new magic to time execution of
2124 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
2134 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
2125
2135
2126 2005-02-19 Fernando Perez <fperez@colorado.edu>
2136 2005-02-19 Fernando Perez <fperez@colorado.edu>
2127
2137
2128 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
2138 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
2129 into keys (for prompts, for example).
2139 into keys (for prompts, for example).
2130
2140
2131 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
2141 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
2132 prompts in case users want them. This introduces a small behavior
2142 prompts in case users want them. This introduces a small behavior
2133 change: ipython does not automatically add a space to all prompts
2143 change: ipython does not automatically add a space to all prompts
2134 anymore. To get the old prompts with a space, users should add it
2144 anymore. To get the old prompts with a space, users should add it
2135 manually to their ipythonrc file, so for example prompt_in1 should
2145 manually to their ipythonrc file, so for example prompt_in1 should
2136 now read 'In [\#]: ' instead of 'In [\#]:'.
2146 now read 'In [\#]: ' instead of 'In [\#]:'.
2137 (BasePrompt.__init__): New option prompts_pad_left (only in rc
2147 (BasePrompt.__init__): New option prompts_pad_left (only in rc
2138 file) to control left-padding of secondary prompts.
2148 file) to control left-padding of secondary prompts.
2139
2149
2140 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
2150 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
2141 the profiler can't be imported. Fix for Debian, which removed
2151 the profiler can't be imported. Fix for Debian, which removed
2142 profile.py because of License issues. I applied a slightly
2152 profile.py because of License issues. I applied a slightly
2143 modified version of the original Debian patch at
2153 modified version of the original Debian patch at
2144 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
2154 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
2145
2155
2146 2005-02-17 Fernando Perez <fperez@colorado.edu>
2156 2005-02-17 Fernando Perez <fperez@colorado.edu>
2147
2157
2148 * IPython/genutils.py (native_line_ends): Fix bug which would
2158 * IPython/genutils.py (native_line_ends): Fix bug which would
2149 cause improper line-ends under win32 b/c I was not opening files
2159 cause improper line-ends under win32 b/c I was not opening files
2150 in binary mode. Bug report and fix thanks to Ville.
2160 in binary mode. Bug report and fix thanks to Ville.
2151
2161
2152 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
2162 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
2153 trying to catch spurious foo[1] autocalls. My fix actually broke
2163 trying to catch spurious foo[1] autocalls. My fix actually broke
2154 ',/' autoquote/call with explicit escape (bad regexp).
2164 ',/' autoquote/call with explicit escape (bad regexp).
2155
2165
2156 2005-02-15 *** Released version 0.6.11
2166 2005-02-15 *** Released version 0.6.11
2157
2167
2158 2005-02-14 Fernando Perez <fperez@colorado.edu>
2168 2005-02-14 Fernando Perez <fperez@colorado.edu>
2159
2169
2160 * IPython/background_jobs.py: New background job management
2170 * IPython/background_jobs.py: New background job management
2161 subsystem. This is implemented via a new set of classes, and
2171 subsystem. This is implemented via a new set of classes, and
2162 IPython now provides a builtin 'jobs' object for background job
2172 IPython now provides a builtin 'jobs' object for background job
2163 execution. A convenience %bg magic serves as a lightweight
2173 execution. A convenience %bg magic serves as a lightweight
2164 frontend for starting the more common type of calls. This was
2174 frontend for starting the more common type of calls. This was
2165 inspired by discussions with B. Granger and the BackgroundCommand
2175 inspired by discussions with B. Granger and the BackgroundCommand
2166 class described in the book Python Scripting for Computational
2176 class described in the book Python Scripting for Computational
2167 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
2177 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
2168 (although ultimately no code from this text was used, as IPython's
2178 (although ultimately no code from this text was used, as IPython's
2169 system is a separate implementation).
2179 system is a separate implementation).
2170
2180
2171 * IPython/iplib.py (MagicCompleter.python_matches): add new option
2181 * IPython/iplib.py (MagicCompleter.python_matches): add new option
2172 to control the completion of single/double underscore names
2182 to control the completion of single/double underscore names
2173 separately. As documented in the example ipytonrc file, the
2183 separately. As documented in the example ipytonrc file, the
2174 readline_omit__names variable can now be set to 2, to omit even
2184 readline_omit__names variable can now be set to 2, to omit even
2175 single underscore names. Thanks to a patch by Brian Wong
2185 single underscore names. Thanks to a patch by Brian Wong
2176 <BrianWong-AT-AirgoNetworks.Com>.
2186 <BrianWong-AT-AirgoNetworks.Com>.
2177 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
2187 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
2178 be autocalled as foo([1]) if foo were callable. A problem for
2188 be autocalled as foo([1]) if foo were callable. A problem for
2179 things which are both callable and implement __getitem__.
2189 things which are both callable and implement __getitem__.
2180 (init_readline): Fix autoindentation for win32. Thanks to a patch
2190 (init_readline): Fix autoindentation for win32. Thanks to a patch
2181 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
2191 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
2182
2192
2183 2005-02-12 Fernando Perez <fperez@colorado.edu>
2193 2005-02-12 Fernando Perez <fperez@colorado.edu>
2184
2194
2185 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
2195 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
2186 which I had written long ago to sort out user error messages which
2196 which I had written long ago to sort out user error messages which
2187 may occur during startup. This seemed like a good idea initially,
2197 may occur during startup. This seemed like a good idea initially,
2188 but it has proven a disaster in retrospect. I don't want to
2198 but it has proven a disaster in retrospect. I don't want to
2189 change much code for now, so my fix is to set the internal 'debug'
2199 change much code for now, so my fix is to set the internal 'debug'
2190 flag to true everywhere, whose only job was precisely to control
2200 flag to true everywhere, whose only job was precisely to control
2191 this subsystem. This closes issue 28 (as well as avoiding all
2201 this subsystem. This closes issue 28 (as well as avoiding all
2192 sorts of strange hangups which occur from time to time).
2202 sorts of strange hangups which occur from time to time).
2193
2203
2194 2005-02-07 Fernando Perez <fperez@colorado.edu>
2204 2005-02-07 Fernando Perez <fperez@colorado.edu>
2195
2205
2196 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
2206 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
2197 previous call produced a syntax error.
2207 previous call produced a syntax error.
2198
2208
2199 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2209 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2200 classes without constructor.
2210 classes without constructor.
2201
2211
2202 2005-02-06 Fernando Perez <fperez@colorado.edu>
2212 2005-02-06 Fernando Perez <fperez@colorado.edu>
2203
2213
2204 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
2214 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
2205 completions with the results of each matcher, so we return results
2215 completions with the results of each matcher, so we return results
2206 to the user from all namespaces. This breaks with ipython
2216 to the user from all namespaces. This breaks with ipython
2207 tradition, but I think it's a nicer behavior. Now you get all
2217 tradition, but I think it's a nicer behavior. Now you get all
2208 possible completions listed, from all possible namespaces (python,
2218 possible completions listed, from all possible namespaces (python,
2209 filesystem, magics...) After a request by John Hunter
2219 filesystem, magics...) After a request by John Hunter
2210 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2220 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2211
2221
2212 2005-02-05 Fernando Perez <fperez@colorado.edu>
2222 2005-02-05 Fernando Perez <fperez@colorado.edu>
2213
2223
2214 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
2224 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
2215 the call had quote characters in it (the quotes were stripped).
2225 the call had quote characters in it (the quotes were stripped).
2216
2226
2217 2005-01-31 Fernando Perez <fperez@colorado.edu>
2227 2005-01-31 Fernando Perez <fperez@colorado.edu>
2218
2228
2219 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
2229 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
2220 Itpl.itpl() to make the code more robust against psyco
2230 Itpl.itpl() to make the code more robust against psyco
2221 optimizations.
2231 optimizations.
2222
2232
2223 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
2233 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
2224 of causing an exception. Quicker, cleaner.
2234 of causing an exception. Quicker, cleaner.
2225
2235
2226 2005-01-28 Fernando Perez <fperez@colorado.edu>
2236 2005-01-28 Fernando Perez <fperez@colorado.edu>
2227
2237
2228 * scripts/ipython_win_post_install.py (install): hardcode
2238 * scripts/ipython_win_post_install.py (install): hardcode
2229 sys.prefix+'python.exe' as the executable path. It turns out that
2239 sys.prefix+'python.exe' as the executable path. It turns out that
2230 during the post-installation run, sys.executable resolves to the
2240 during the post-installation run, sys.executable resolves to the
2231 name of the binary installer! I should report this as a distutils
2241 name of the binary installer! I should report this as a distutils
2232 bug, I think. I updated the .10 release with this tiny fix, to
2242 bug, I think. I updated the .10 release with this tiny fix, to
2233 avoid annoying the lists further.
2243 avoid annoying the lists further.
2234
2244
2235 2005-01-27 *** Released version 0.6.10
2245 2005-01-27 *** Released version 0.6.10
2236
2246
2237 2005-01-27 Fernando Perez <fperez@colorado.edu>
2247 2005-01-27 Fernando Perez <fperez@colorado.edu>
2238
2248
2239 * IPython/numutils.py (norm): Added 'inf' as optional name for
2249 * IPython/numutils.py (norm): Added 'inf' as optional name for
2240 L-infinity norm, included references to mathworld.com for vector
2250 L-infinity norm, included references to mathworld.com for vector
2241 norm definitions.
2251 norm definitions.
2242 (amin/amax): added amin/amax for array min/max. Similar to what
2252 (amin/amax): added amin/amax for array min/max. Similar to what
2243 pylab ships with after the recent reorganization of names.
2253 pylab ships with after the recent reorganization of names.
2244 (spike/spike_odd): removed deprecated spike/spike_odd functions.
2254 (spike/spike_odd): removed deprecated spike/spike_odd functions.
2245
2255
2246 * ipython.el: committed Alex's recent fixes and improvements.
2256 * ipython.el: committed Alex's recent fixes and improvements.
2247 Tested with python-mode from CVS, and it looks excellent. Since
2257 Tested with python-mode from CVS, and it looks excellent. Since
2248 python-mode hasn't released anything in a while, I'm temporarily
2258 python-mode hasn't released anything in a while, I'm temporarily
2249 putting a copy of today's CVS (v 4.70) of python-mode in:
2259 putting a copy of today's CVS (v 4.70) of python-mode in:
2250 http://ipython.scipy.org/tmp/python-mode.el
2260 http://ipython.scipy.org/tmp/python-mode.el
2251
2261
2252 * scripts/ipython_win_post_install.py (install): Win32 fix to use
2262 * scripts/ipython_win_post_install.py (install): Win32 fix to use
2253 sys.executable for the executable name, instead of assuming it's
2263 sys.executable for the executable name, instead of assuming it's
2254 called 'python.exe' (the post-installer would have produced broken
2264 called 'python.exe' (the post-installer would have produced broken
2255 setups on systems with a differently named python binary).
2265 setups on systems with a differently named python binary).
2256
2266
2257 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
2267 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
2258 references to os.linesep, to make the code more
2268 references to os.linesep, to make the code more
2259 platform-independent. This is also part of the win32 coloring
2269 platform-independent. This is also part of the win32 coloring
2260 fixes.
2270 fixes.
2261
2271
2262 * IPython/genutils.py (page_dumb): Remove attempts to chop long
2272 * IPython/genutils.py (page_dumb): Remove attempts to chop long
2263 lines, which actually cause coloring bugs because the length of
2273 lines, which actually cause coloring bugs because the length of
2264 the line is very difficult to correctly compute with embedded
2274 the line is very difficult to correctly compute with embedded
2265 escapes. This was the source of all the coloring problems under
2275 escapes. This was the source of all the coloring problems under
2266 Win32. I think that _finally_, Win32 users have a properly
2276 Win32. I think that _finally_, Win32 users have a properly
2267 working ipython in all respects. This would never have happened
2277 working ipython in all respects. This would never have happened
2268 if not for Gary Bishop and Viktor Ransmayr's great help and work.
2278 if not for Gary Bishop and Viktor Ransmayr's great help and work.
2269
2279
2270 2005-01-26 *** Released version 0.6.9
2280 2005-01-26 *** Released version 0.6.9
2271
2281
2272 2005-01-25 Fernando Perez <fperez@colorado.edu>
2282 2005-01-25 Fernando Perez <fperez@colorado.edu>
2273
2283
2274 * setup.py: finally, we have a true Windows installer, thanks to
2284 * setup.py: finally, we have a true Windows installer, thanks to
2275 the excellent work of Viktor Ransmayr
2285 the excellent work of Viktor Ransmayr
2276 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
2286 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
2277 Windows users. The setup routine is quite a bit cleaner thanks to
2287 Windows users. The setup routine is quite a bit cleaner thanks to
2278 this, and the post-install script uses the proper functions to
2288 this, and the post-install script uses the proper functions to
2279 allow a clean de-installation using the standard Windows Control
2289 allow a clean de-installation using the standard Windows Control
2280 Panel.
2290 Panel.
2281
2291
2282 * IPython/genutils.py (get_home_dir): changed to use the $HOME
2292 * IPython/genutils.py (get_home_dir): changed to use the $HOME
2283 environment variable under all OSes (including win32) if
2293 environment variable under all OSes (including win32) if
2284 available. This will give consistency to win32 users who have set
2294 available. This will give consistency to win32 users who have set
2285 this variable for any reason. If os.environ['HOME'] fails, the
2295 this variable for any reason. If os.environ['HOME'] fails, the
2286 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
2296 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
2287
2297
2288 2005-01-24 Fernando Perez <fperez@colorado.edu>
2298 2005-01-24 Fernando Perez <fperez@colorado.edu>
2289
2299
2290 * IPython/numutils.py (empty_like): add empty_like(), similar to
2300 * IPython/numutils.py (empty_like): add empty_like(), similar to
2291 zeros_like() but taking advantage of the new empty() Numeric routine.
2301 zeros_like() but taking advantage of the new empty() Numeric routine.
2292
2302
2293 2005-01-23 *** Released version 0.6.8
2303 2005-01-23 *** Released version 0.6.8
2294
2304
2295 2005-01-22 Fernando Perez <fperez@colorado.edu>
2305 2005-01-22 Fernando Perez <fperez@colorado.edu>
2296
2306
2297 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
2307 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
2298 automatic show() calls. After discussing things with JDH, it
2308 automatic show() calls. After discussing things with JDH, it
2299 turns out there are too many corner cases where this can go wrong.
2309 turns out there are too many corner cases where this can go wrong.
2300 It's best not to try to be 'too smart', and simply have ipython
2310 It's best not to try to be 'too smart', and simply have ipython
2301 reproduce as much as possible the default behavior of a normal
2311 reproduce as much as possible the default behavior of a normal
2302 python shell.
2312 python shell.
2303
2313
2304 * IPython/iplib.py (InteractiveShell.__init__): Modified the
2314 * IPython/iplib.py (InteractiveShell.__init__): Modified the
2305 line-splitting regexp and _prefilter() to avoid calling getattr()
2315 line-splitting regexp and _prefilter() to avoid calling getattr()
2306 on assignments. This closes
2316 on assignments. This closes
2307 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
2317 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
2308 readline uses getattr(), so a simple <TAB> keypress is still
2318 readline uses getattr(), so a simple <TAB> keypress is still
2309 enough to trigger getattr() calls on an object.
2319 enough to trigger getattr() calls on an object.
2310
2320
2311 2005-01-21 Fernando Perez <fperez@colorado.edu>
2321 2005-01-21 Fernando Perez <fperez@colorado.edu>
2312
2322
2313 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
2323 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
2314 docstring under pylab so it doesn't mask the original.
2324 docstring under pylab so it doesn't mask the original.
2315
2325
2316 2005-01-21 *** Released version 0.6.7
2326 2005-01-21 *** Released version 0.6.7
2317
2327
2318 2005-01-21 Fernando Perez <fperez@colorado.edu>
2328 2005-01-21 Fernando Perez <fperez@colorado.edu>
2319
2329
2320 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
2330 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
2321 signal handling for win32 users in multithreaded mode.
2331 signal handling for win32 users in multithreaded mode.
2322
2332
2323 2005-01-17 Fernando Perez <fperez@colorado.edu>
2333 2005-01-17 Fernando Perez <fperez@colorado.edu>
2324
2334
2325 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2335 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2326 instances with no __init__. After a crash report by Norbert Nemec
2336 instances with no __init__. After a crash report by Norbert Nemec
2327 <Norbert-AT-nemec-online.de>.
2337 <Norbert-AT-nemec-online.de>.
2328
2338
2329 2005-01-14 Fernando Perez <fperez@colorado.edu>
2339 2005-01-14 Fernando Perez <fperez@colorado.edu>
2330
2340
2331 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
2341 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
2332 names for verbose exceptions, when multiple dotted names and the
2342 names for verbose exceptions, when multiple dotted names and the
2333 'parent' object were present on the same line.
2343 'parent' object were present on the same line.
2334
2344
2335 2005-01-11 Fernando Perez <fperez@colorado.edu>
2345 2005-01-11 Fernando Perez <fperez@colorado.edu>
2336
2346
2337 * IPython/genutils.py (flag_calls): new utility to trap and flag
2347 * IPython/genutils.py (flag_calls): new utility to trap and flag
2338 calls in functions. I need it to clean up matplotlib support.
2348 calls in functions. I need it to clean up matplotlib support.
2339 Also removed some deprecated code in genutils.
2349 Also removed some deprecated code in genutils.
2340
2350
2341 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
2351 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
2342 that matplotlib scripts called with %run, which don't call show()
2352 that matplotlib scripts called with %run, which don't call show()
2343 themselves, still have their plotting windows open.
2353 themselves, still have their plotting windows open.
2344
2354
2345 2005-01-05 Fernando Perez <fperez@colorado.edu>
2355 2005-01-05 Fernando Perez <fperez@colorado.edu>
2346
2356
2347 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
2357 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
2348 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
2358 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
2349
2359
2350 2004-12-19 Fernando Perez <fperez@colorado.edu>
2360 2004-12-19 Fernando Perez <fperez@colorado.edu>
2351
2361
2352 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
2362 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
2353 parent_runcode, which was an eyesore. The same result can be
2363 parent_runcode, which was an eyesore. The same result can be
2354 obtained with Python's regular superclass mechanisms.
2364 obtained with Python's regular superclass mechanisms.
2355
2365
2356 2004-12-17 Fernando Perez <fperez@colorado.edu>
2366 2004-12-17 Fernando Perez <fperez@colorado.edu>
2357
2367
2358 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
2368 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
2359 reported by Prabhu.
2369 reported by Prabhu.
2360 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
2370 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
2361 sys.stderr) instead of explicitly calling sys.stderr. This helps
2371 sys.stderr) instead of explicitly calling sys.stderr. This helps
2362 maintain our I/O abstractions clean, for future GUI embeddings.
2372 maintain our I/O abstractions clean, for future GUI embeddings.
2363
2373
2364 * IPython/genutils.py (info): added new utility for sys.stderr
2374 * IPython/genutils.py (info): added new utility for sys.stderr
2365 unified info message handling (thin wrapper around warn()).
2375 unified info message handling (thin wrapper around warn()).
2366
2376
2367 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
2377 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
2368 composite (dotted) names on verbose exceptions.
2378 composite (dotted) names on verbose exceptions.
2369 (VerboseTB.nullrepr): harden against another kind of errors which
2379 (VerboseTB.nullrepr): harden against another kind of errors which
2370 Python's inspect module can trigger, and which were crashing
2380 Python's inspect module can trigger, and which were crashing
2371 IPython. Thanks to a report by Marco Lombardi
2381 IPython. Thanks to a report by Marco Lombardi
2372 <mlombard-AT-ma010192.hq.eso.org>.
2382 <mlombard-AT-ma010192.hq.eso.org>.
2373
2383
2374 2004-12-13 *** Released version 0.6.6
2384 2004-12-13 *** Released version 0.6.6
2375
2385
2376 2004-12-12 Fernando Perez <fperez@colorado.edu>
2386 2004-12-12 Fernando Perez <fperez@colorado.edu>
2377
2387
2378 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
2388 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
2379 generated by pygtk upon initialization if it was built without
2389 generated by pygtk upon initialization if it was built without
2380 threads (for matplotlib users). After a crash reported by
2390 threads (for matplotlib users). After a crash reported by
2381 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
2391 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
2382
2392
2383 * IPython/ipmaker.py (make_IPython): fix small bug in the
2393 * IPython/ipmaker.py (make_IPython): fix small bug in the
2384 import_some parameter for multiple imports.
2394 import_some parameter for multiple imports.
2385
2395
2386 * IPython/iplib.py (ipmagic): simplified the interface of
2396 * IPython/iplib.py (ipmagic): simplified the interface of
2387 ipmagic() to take a single string argument, just as it would be
2397 ipmagic() to take a single string argument, just as it would be
2388 typed at the IPython cmd line.
2398 typed at the IPython cmd line.
2389 (ipalias): Added new ipalias() with an interface identical to
2399 (ipalias): Added new ipalias() with an interface identical to
2390 ipmagic(). This completes exposing a pure python interface to the
2400 ipmagic(). This completes exposing a pure python interface to the
2391 alias and magic system, which can be used in loops or more complex
2401 alias and magic system, which can be used in loops or more complex
2392 code where IPython's automatic line mangling is not active.
2402 code where IPython's automatic line mangling is not active.
2393
2403
2394 * IPython/genutils.py (timing): changed interface of timing to
2404 * IPython/genutils.py (timing): changed interface of timing to
2395 simply run code once, which is the most common case. timings()
2405 simply run code once, which is the most common case. timings()
2396 remains unchanged, for the cases where you want multiple runs.
2406 remains unchanged, for the cases where you want multiple runs.
2397
2407
2398 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
2408 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
2399 bug where Python2.2 crashes with exec'ing code which does not end
2409 bug where Python2.2 crashes with exec'ing code which does not end
2400 in a single newline. Python 2.3 is OK, so I hadn't noticed this
2410 in a single newline. Python 2.3 is OK, so I hadn't noticed this
2401 before.
2411 before.
2402
2412
2403 2004-12-10 Fernando Perez <fperez@colorado.edu>
2413 2004-12-10 Fernando Perez <fperez@colorado.edu>
2404
2414
2405 * IPython/Magic.py (Magic.magic_prun): changed name of option from
2415 * IPython/Magic.py (Magic.magic_prun): changed name of option from
2406 -t to -T, to accomodate the new -t flag in %run (the %run and
2416 -t to -T, to accomodate the new -t flag in %run (the %run and
2407 %prun options are kind of intermixed, and it's not easy to change
2417 %prun options are kind of intermixed, and it's not easy to change
2408 this with the limitations of python's getopt).
2418 this with the limitations of python's getopt).
2409
2419
2410 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
2420 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
2411 the execution of scripts. It's not as fine-tuned as timeit.py,
2421 the execution of scripts. It's not as fine-tuned as timeit.py,
2412 but it works from inside ipython (and under 2.2, which lacks
2422 but it works from inside ipython (and under 2.2, which lacks
2413 timeit.py). Optionally a number of runs > 1 can be given for
2423 timeit.py). Optionally a number of runs > 1 can be given for
2414 timing very short-running code.
2424 timing very short-running code.
2415
2425
2416 * IPython/genutils.py (uniq_stable): new routine which returns a
2426 * IPython/genutils.py (uniq_stable): new routine which returns a
2417 list of unique elements in any iterable, but in stable order of
2427 list of unique elements in any iterable, but in stable order of
2418 appearance. I needed this for the ultraTB fixes, and it's a handy
2428 appearance. I needed this for the ultraTB fixes, and it's a handy
2419 utility.
2429 utility.
2420
2430
2421 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
2431 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
2422 dotted names in Verbose exceptions. This had been broken since
2432 dotted names in Verbose exceptions. This had been broken since
2423 the very start, now x.y will properly be printed in a Verbose
2433 the very start, now x.y will properly be printed in a Verbose
2424 traceback, instead of x being shown and y appearing always as an
2434 traceback, instead of x being shown and y appearing always as an
2425 'undefined global'. Getting this to work was a bit tricky,
2435 'undefined global'. Getting this to work was a bit tricky,
2426 because by default python tokenizers are stateless. Saved by
2436 because by default python tokenizers are stateless. Saved by
2427 python's ability to easily add a bit of state to an arbitrary
2437 python's ability to easily add a bit of state to an arbitrary
2428 function (without needing to build a full-blown callable object).
2438 function (without needing to build a full-blown callable object).
2429
2439
2430 Also big cleanup of this code, which had horrendous runtime
2440 Also big cleanup of this code, which had horrendous runtime
2431 lookups of zillions of attributes for colorization. Moved all
2441 lookups of zillions of attributes for colorization. Moved all
2432 this code into a few templates, which make it cleaner and quicker.
2442 this code into a few templates, which make it cleaner and quicker.
2433
2443
2434 Printout quality was also improved for Verbose exceptions: one
2444 Printout quality was also improved for Verbose exceptions: one
2435 variable per line, and memory addresses are printed (this can be
2445 variable per line, and memory addresses are printed (this can be
2436 quite handy in nasty debugging situations, which is what Verbose
2446 quite handy in nasty debugging situations, which is what Verbose
2437 is for).
2447 is for).
2438
2448
2439 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
2449 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
2440 the command line as scripts to be loaded by embedded instances.
2450 the command line as scripts to be loaded by embedded instances.
2441 Doing so has the potential for an infinite recursion if there are
2451 Doing so has the potential for an infinite recursion if there are
2442 exceptions thrown in the process. This fixes a strange crash
2452 exceptions thrown in the process. This fixes a strange crash
2443 reported by Philippe MULLER <muller-AT-irit.fr>.
2453 reported by Philippe MULLER <muller-AT-irit.fr>.
2444
2454
2445 2004-12-09 Fernando Perez <fperez@colorado.edu>
2455 2004-12-09 Fernando Perez <fperez@colorado.edu>
2446
2456
2447 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
2457 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
2448 to reflect new names in matplotlib, which now expose the
2458 to reflect new names in matplotlib, which now expose the
2449 matlab-compatible interface via a pylab module instead of the
2459 matlab-compatible interface via a pylab module instead of the
2450 'matlab' name. The new code is backwards compatible, so users of
2460 'matlab' name. The new code is backwards compatible, so users of
2451 all matplotlib versions are OK. Patch by J. Hunter.
2461 all matplotlib versions are OK. Patch by J. Hunter.
2452
2462
2453 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
2463 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
2454 of __init__ docstrings for instances (class docstrings are already
2464 of __init__ docstrings for instances (class docstrings are already
2455 automatically printed). Instances with customized docstrings
2465 automatically printed). Instances with customized docstrings
2456 (indep. of the class) are also recognized and all 3 separate
2466 (indep. of the class) are also recognized and all 3 separate
2457 docstrings are printed (instance, class, constructor). After some
2467 docstrings are printed (instance, class, constructor). After some
2458 comments/suggestions by J. Hunter.
2468 comments/suggestions by J. Hunter.
2459
2469
2460 2004-12-05 Fernando Perez <fperez@colorado.edu>
2470 2004-12-05 Fernando Perez <fperez@colorado.edu>
2461
2471
2462 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
2472 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
2463 warnings when tab-completion fails and triggers an exception.
2473 warnings when tab-completion fails and triggers an exception.
2464
2474
2465 2004-12-03 Fernando Perez <fperez@colorado.edu>
2475 2004-12-03 Fernando Perez <fperez@colorado.edu>
2466
2476
2467 * IPython/Magic.py (magic_prun): Fix bug where an exception would
2477 * IPython/Magic.py (magic_prun): Fix bug where an exception would
2468 be triggered when using 'run -p'. An incorrect option flag was
2478 be triggered when using 'run -p'. An incorrect option flag was
2469 being set ('d' instead of 'D').
2479 being set ('d' instead of 'D').
2470 (manpage): fix missing escaped \- sign.
2480 (manpage): fix missing escaped \- sign.
2471
2481
2472 2004-11-30 *** Released version 0.6.5
2482 2004-11-30 *** Released version 0.6.5
2473
2483
2474 2004-11-30 Fernando Perez <fperez@colorado.edu>
2484 2004-11-30 Fernando Perez <fperez@colorado.edu>
2475
2485
2476 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
2486 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
2477 setting with -d option.
2487 setting with -d option.
2478
2488
2479 * setup.py (docfiles): Fix problem where the doc glob I was using
2489 * setup.py (docfiles): Fix problem where the doc glob I was using
2480 was COMPLETELY BROKEN. It was giving the right files by pure
2490 was COMPLETELY BROKEN. It was giving the right files by pure
2481 accident, but failed once I tried to include ipython.el. Note:
2491 accident, but failed once I tried to include ipython.el. Note:
2482 glob() does NOT allow you to do exclusion on multiple endings!
2492 glob() does NOT allow you to do exclusion on multiple endings!
2483
2493
2484 2004-11-29 Fernando Perez <fperez@colorado.edu>
2494 2004-11-29 Fernando Perez <fperez@colorado.edu>
2485
2495
2486 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2496 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2487 the manpage as the source. Better formatting & consistency.
2497 the manpage as the source. Better formatting & consistency.
2488
2498
2489 * IPython/Magic.py (magic_run): Added new -d option, to run
2499 * IPython/Magic.py (magic_run): Added new -d option, to run
2490 scripts under the control of the python pdb debugger. Note that
2500 scripts under the control of the python pdb debugger. Note that
2491 this required changing the %prun option -d to -D, to avoid a clash
2501 this required changing the %prun option -d to -D, to avoid a clash
2492 (since %run must pass options to %prun, and getopt is too dumb to
2502 (since %run must pass options to %prun, and getopt is too dumb to
2493 handle options with string values with embedded spaces). Thanks
2503 handle options with string values with embedded spaces). Thanks
2494 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2504 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2495 (magic_who_ls): added type matching to %who and %whos, so that one
2505 (magic_who_ls): added type matching to %who and %whos, so that one
2496 can filter their output to only include variables of certain
2506 can filter their output to only include variables of certain
2497 types. Another suggestion by Matthew.
2507 types. Another suggestion by Matthew.
2498 (magic_whos): Added memory summaries in kb and Mb for arrays.
2508 (magic_whos): Added memory summaries in kb and Mb for arrays.
2499 (magic_who): Improve formatting (break lines every 9 vars).
2509 (magic_who): Improve formatting (break lines every 9 vars).
2500
2510
2501 2004-11-28 Fernando Perez <fperez@colorado.edu>
2511 2004-11-28 Fernando Perez <fperez@colorado.edu>
2502
2512
2503 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2513 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2504 cache when empty lines were present.
2514 cache when empty lines were present.
2505
2515
2506 2004-11-24 Fernando Perez <fperez@colorado.edu>
2516 2004-11-24 Fernando Perez <fperez@colorado.edu>
2507
2517
2508 * IPython/usage.py (__doc__): document the re-activated threading
2518 * IPython/usage.py (__doc__): document the re-activated threading
2509 options for WX and GTK.
2519 options for WX and GTK.
2510
2520
2511 2004-11-23 Fernando Perez <fperez@colorado.edu>
2521 2004-11-23 Fernando Perez <fperez@colorado.edu>
2512
2522
2513 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2523 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2514 the -wthread and -gthread options, along with a new -tk one to try
2524 the -wthread and -gthread options, along with a new -tk one to try
2515 and coordinate Tk threading with wx/gtk. The tk support is very
2525 and coordinate Tk threading with wx/gtk. The tk support is very
2516 platform dependent, since it seems to require Tcl and Tk to be
2526 platform dependent, since it seems to require Tcl and Tk to be
2517 built with threads (Fedora1/2 appears NOT to have it, but in
2527 built with threads (Fedora1/2 appears NOT to have it, but in
2518 Prabhu's Debian boxes it works OK). But even with some Tk
2528 Prabhu's Debian boxes it works OK). But even with some Tk
2519 limitations, this is a great improvement.
2529 limitations, this is a great improvement.
2520
2530
2521 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2531 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2522 info in user prompts. Patch by Prabhu.
2532 info in user prompts. Patch by Prabhu.
2523
2533
2524 2004-11-18 Fernando Perez <fperez@colorado.edu>
2534 2004-11-18 Fernando Perez <fperez@colorado.edu>
2525
2535
2526 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2536 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2527 EOFErrors and bail, to avoid infinite loops if a non-terminating
2537 EOFErrors and bail, to avoid infinite loops if a non-terminating
2528 file is fed into ipython. Patch submitted in issue 19 by user,
2538 file is fed into ipython. Patch submitted in issue 19 by user,
2529 many thanks.
2539 many thanks.
2530
2540
2531 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2541 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2532 autoquote/parens in continuation prompts, which can cause lots of
2542 autoquote/parens in continuation prompts, which can cause lots of
2533 problems. Closes roundup issue 20.
2543 problems. Closes roundup issue 20.
2534
2544
2535 2004-11-17 Fernando Perez <fperez@colorado.edu>
2545 2004-11-17 Fernando Perez <fperez@colorado.edu>
2536
2546
2537 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2547 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2538 reported as debian bug #280505. I'm not sure my local changelog
2548 reported as debian bug #280505. I'm not sure my local changelog
2539 entry has the proper debian format (Jack?).
2549 entry has the proper debian format (Jack?).
2540
2550
2541 2004-11-08 *** Released version 0.6.4
2551 2004-11-08 *** Released version 0.6.4
2542
2552
2543 2004-11-08 Fernando Perez <fperez@colorado.edu>
2553 2004-11-08 Fernando Perez <fperez@colorado.edu>
2544
2554
2545 * IPython/iplib.py (init_readline): Fix exit message for Windows
2555 * IPython/iplib.py (init_readline): Fix exit message for Windows
2546 when readline is active. Thanks to a report by Eric Jones
2556 when readline is active. Thanks to a report by Eric Jones
2547 <eric-AT-enthought.com>.
2557 <eric-AT-enthought.com>.
2548
2558
2549 2004-11-07 Fernando Perez <fperez@colorado.edu>
2559 2004-11-07 Fernando Perez <fperez@colorado.edu>
2550
2560
2551 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2561 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2552 sometimes seen by win2k/cygwin users.
2562 sometimes seen by win2k/cygwin users.
2553
2563
2554 2004-11-06 Fernando Perez <fperez@colorado.edu>
2564 2004-11-06 Fernando Perez <fperez@colorado.edu>
2555
2565
2556 * IPython/iplib.py (interact): Change the handling of %Exit from
2566 * IPython/iplib.py (interact): Change the handling of %Exit from
2557 trying to propagate a SystemExit to an internal ipython flag.
2567 trying to propagate a SystemExit to an internal ipython flag.
2558 This is less elegant than using Python's exception mechanism, but
2568 This is less elegant than using Python's exception mechanism, but
2559 I can't get that to work reliably with threads, so under -pylab
2569 I can't get that to work reliably with threads, so under -pylab
2560 %Exit was hanging IPython. Cross-thread exception handling is
2570 %Exit was hanging IPython. Cross-thread exception handling is
2561 really a bitch. Thaks to a bug report by Stephen Walton
2571 really a bitch. Thaks to a bug report by Stephen Walton
2562 <stephen.walton-AT-csun.edu>.
2572 <stephen.walton-AT-csun.edu>.
2563
2573
2564 2004-11-04 Fernando Perez <fperez@colorado.edu>
2574 2004-11-04 Fernando Perez <fperez@colorado.edu>
2565
2575
2566 * IPython/iplib.py (raw_input_original): store a pointer to the
2576 * IPython/iplib.py (raw_input_original): store a pointer to the
2567 true raw_input to harden against code which can modify it
2577 true raw_input to harden against code which can modify it
2568 (wx.py.PyShell does this and would otherwise crash ipython).
2578 (wx.py.PyShell does this and would otherwise crash ipython).
2569 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2579 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2570
2580
2571 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2581 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2572 Ctrl-C problem, which does not mess up the input line.
2582 Ctrl-C problem, which does not mess up the input line.
2573
2583
2574 2004-11-03 Fernando Perez <fperez@colorado.edu>
2584 2004-11-03 Fernando Perez <fperez@colorado.edu>
2575
2585
2576 * IPython/Release.py: Changed licensing to BSD, in all files.
2586 * IPython/Release.py: Changed licensing to BSD, in all files.
2577 (name): lowercase name for tarball/RPM release.
2587 (name): lowercase name for tarball/RPM release.
2578
2588
2579 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2589 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2580 use throughout ipython.
2590 use throughout ipython.
2581
2591
2582 * IPython/Magic.py (Magic._ofind): Switch to using the new
2592 * IPython/Magic.py (Magic._ofind): Switch to using the new
2583 OInspect.getdoc() function.
2593 OInspect.getdoc() function.
2584
2594
2585 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2595 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2586 of the line currently being canceled via Ctrl-C. It's extremely
2596 of the line currently being canceled via Ctrl-C. It's extremely
2587 ugly, but I don't know how to do it better (the problem is one of
2597 ugly, but I don't know how to do it better (the problem is one of
2588 handling cross-thread exceptions).
2598 handling cross-thread exceptions).
2589
2599
2590 2004-10-28 Fernando Perez <fperez@colorado.edu>
2600 2004-10-28 Fernando Perez <fperez@colorado.edu>
2591
2601
2592 * IPython/Shell.py (signal_handler): add signal handlers to trap
2602 * IPython/Shell.py (signal_handler): add signal handlers to trap
2593 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2603 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2594 report by Francesc Alted.
2604 report by Francesc Alted.
2595
2605
2596 2004-10-21 Fernando Perez <fperez@colorado.edu>
2606 2004-10-21 Fernando Perez <fperez@colorado.edu>
2597
2607
2598 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2608 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2599 to % for pysh syntax extensions.
2609 to % for pysh syntax extensions.
2600
2610
2601 2004-10-09 Fernando Perez <fperez@colorado.edu>
2611 2004-10-09 Fernando Perez <fperez@colorado.edu>
2602
2612
2603 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2613 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2604 arrays to print a more useful summary, without calling str(arr).
2614 arrays to print a more useful summary, without calling str(arr).
2605 This avoids the problem of extremely lengthy computations which
2615 This avoids the problem of extremely lengthy computations which
2606 occur if arr is large, and appear to the user as a system lockup
2616 occur if arr is large, and appear to the user as a system lockup
2607 with 100% cpu activity. After a suggestion by Kristian Sandberg
2617 with 100% cpu activity. After a suggestion by Kristian Sandberg
2608 <Kristian.Sandberg@colorado.edu>.
2618 <Kristian.Sandberg@colorado.edu>.
2609 (Magic.__init__): fix bug in global magic escapes not being
2619 (Magic.__init__): fix bug in global magic escapes not being
2610 correctly set.
2620 correctly set.
2611
2621
2612 2004-10-08 Fernando Perez <fperez@colorado.edu>
2622 2004-10-08 Fernando Perez <fperez@colorado.edu>
2613
2623
2614 * IPython/Magic.py (__license__): change to absolute imports of
2624 * IPython/Magic.py (__license__): change to absolute imports of
2615 ipython's own internal packages, to start adapting to the absolute
2625 ipython's own internal packages, to start adapting to the absolute
2616 import requirement of PEP-328.
2626 import requirement of PEP-328.
2617
2627
2618 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2628 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2619 files, and standardize author/license marks through the Release
2629 files, and standardize author/license marks through the Release
2620 module instead of having per/file stuff (except for files with
2630 module instead of having per/file stuff (except for files with
2621 particular licenses, like the MIT/PSF-licensed codes).
2631 particular licenses, like the MIT/PSF-licensed codes).
2622
2632
2623 * IPython/Debugger.py: remove dead code for python 2.1
2633 * IPython/Debugger.py: remove dead code for python 2.1
2624
2634
2625 2004-10-04 Fernando Perez <fperez@colorado.edu>
2635 2004-10-04 Fernando Perez <fperez@colorado.edu>
2626
2636
2627 * IPython/iplib.py (ipmagic): New function for accessing magics
2637 * IPython/iplib.py (ipmagic): New function for accessing magics
2628 via a normal python function call.
2638 via a normal python function call.
2629
2639
2630 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2640 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2631 from '@' to '%', to accomodate the new @decorator syntax of python
2641 from '@' to '%', to accomodate the new @decorator syntax of python
2632 2.4.
2642 2.4.
2633
2643
2634 2004-09-29 Fernando Perez <fperez@colorado.edu>
2644 2004-09-29 Fernando Perez <fperez@colorado.edu>
2635
2645
2636 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2646 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2637 matplotlib.use to prevent running scripts which try to switch
2647 matplotlib.use to prevent running scripts which try to switch
2638 interactive backends from within ipython. This will just crash
2648 interactive backends from within ipython. This will just crash
2639 the python interpreter, so we can't allow it (but a detailed error
2649 the python interpreter, so we can't allow it (but a detailed error
2640 is given to the user).
2650 is given to the user).
2641
2651
2642 2004-09-28 Fernando Perez <fperez@colorado.edu>
2652 2004-09-28 Fernando Perez <fperez@colorado.edu>
2643
2653
2644 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2654 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2645 matplotlib-related fixes so that using @run with non-matplotlib
2655 matplotlib-related fixes so that using @run with non-matplotlib
2646 scripts doesn't pop up spurious plot windows. This requires
2656 scripts doesn't pop up spurious plot windows. This requires
2647 matplotlib >= 0.63, where I had to make some changes as well.
2657 matplotlib >= 0.63, where I had to make some changes as well.
2648
2658
2649 * IPython/ipmaker.py (make_IPython): update version requirement to
2659 * IPython/ipmaker.py (make_IPython): update version requirement to
2650 python 2.2.
2660 python 2.2.
2651
2661
2652 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2662 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2653 banner arg for embedded customization.
2663 banner arg for embedded customization.
2654
2664
2655 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2665 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2656 explicit uses of __IP as the IPython's instance name. Now things
2666 explicit uses of __IP as the IPython's instance name. Now things
2657 are properly handled via the shell.name value. The actual code
2667 are properly handled via the shell.name value. The actual code
2658 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2668 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2659 is much better than before. I'll clean things completely when the
2669 is much better than before. I'll clean things completely when the
2660 magic stuff gets a real overhaul.
2670 magic stuff gets a real overhaul.
2661
2671
2662 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2672 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2663 minor changes to debian dir.
2673 minor changes to debian dir.
2664
2674
2665 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2675 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2666 pointer to the shell itself in the interactive namespace even when
2676 pointer to the shell itself in the interactive namespace even when
2667 a user-supplied dict is provided. This is needed for embedding
2677 a user-supplied dict is provided. This is needed for embedding
2668 purposes (found by tests with Michel Sanner).
2678 purposes (found by tests with Michel Sanner).
2669
2679
2670 2004-09-27 Fernando Perez <fperez@colorado.edu>
2680 2004-09-27 Fernando Perez <fperez@colorado.edu>
2671
2681
2672 * IPython/UserConfig/ipythonrc: remove []{} from
2682 * IPython/UserConfig/ipythonrc: remove []{} from
2673 readline_remove_delims, so that things like [modname.<TAB> do
2683 readline_remove_delims, so that things like [modname.<TAB> do
2674 proper completion. This disables [].TAB, but that's a less common
2684 proper completion. This disables [].TAB, but that's a less common
2675 case than module names in list comprehensions, for example.
2685 case than module names in list comprehensions, for example.
2676 Thanks to a report by Andrea Riciputi.
2686 Thanks to a report by Andrea Riciputi.
2677
2687
2678 2004-09-09 Fernando Perez <fperez@colorado.edu>
2688 2004-09-09 Fernando Perez <fperez@colorado.edu>
2679
2689
2680 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2690 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2681 blocking problems in win32 and osx. Fix by John.
2691 blocking problems in win32 and osx. Fix by John.
2682
2692
2683 2004-09-08 Fernando Perez <fperez@colorado.edu>
2693 2004-09-08 Fernando Perez <fperez@colorado.edu>
2684
2694
2685 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2695 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2686 for Win32 and OSX. Fix by John Hunter.
2696 for Win32 and OSX. Fix by John Hunter.
2687
2697
2688 2004-08-30 *** Released version 0.6.3
2698 2004-08-30 *** Released version 0.6.3
2689
2699
2690 2004-08-30 Fernando Perez <fperez@colorado.edu>
2700 2004-08-30 Fernando Perez <fperez@colorado.edu>
2691
2701
2692 * setup.py (isfile): Add manpages to list of dependent files to be
2702 * setup.py (isfile): Add manpages to list of dependent files to be
2693 updated.
2703 updated.
2694
2704
2695 2004-08-27 Fernando Perez <fperez@colorado.edu>
2705 2004-08-27 Fernando Perez <fperez@colorado.edu>
2696
2706
2697 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2707 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2698 for now. They don't really work with standalone WX/GTK code
2708 for now. They don't really work with standalone WX/GTK code
2699 (though matplotlib IS working fine with both of those backends).
2709 (though matplotlib IS working fine with both of those backends).
2700 This will neeed much more testing. I disabled most things with
2710 This will neeed much more testing. I disabled most things with
2701 comments, so turning it back on later should be pretty easy.
2711 comments, so turning it back on later should be pretty easy.
2702
2712
2703 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2713 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2704 autocalling of expressions like r'foo', by modifying the line
2714 autocalling of expressions like r'foo', by modifying the line
2705 split regexp. Closes
2715 split regexp. Closes
2706 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2716 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2707 Riley <ipythonbugs-AT-sabi.net>.
2717 Riley <ipythonbugs-AT-sabi.net>.
2708 (InteractiveShell.mainloop): honor --nobanner with banner
2718 (InteractiveShell.mainloop): honor --nobanner with banner
2709 extensions.
2719 extensions.
2710
2720
2711 * IPython/Shell.py: Significant refactoring of all classes, so
2721 * IPython/Shell.py: Significant refactoring of all classes, so
2712 that we can really support ALL matplotlib backends and threading
2722 that we can really support ALL matplotlib backends and threading
2713 models (John spotted a bug with Tk which required this). Now we
2723 models (John spotted a bug with Tk which required this). Now we
2714 should support single-threaded, WX-threads and GTK-threads, both
2724 should support single-threaded, WX-threads and GTK-threads, both
2715 for generic code and for matplotlib.
2725 for generic code and for matplotlib.
2716
2726
2717 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2727 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2718 -pylab, to simplify things for users. Will also remove the pylab
2728 -pylab, to simplify things for users. Will also remove the pylab
2719 profile, since now all of matplotlib configuration is directly
2729 profile, since now all of matplotlib configuration is directly
2720 handled here. This also reduces startup time.
2730 handled here. This also reduces startup time.
2721
2731
2722 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2732 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2723 shell wasn't being correctly called. Also in IPShellWX.
2733 shell wasn't being correctly called. Also in IPShellWX.
2724
2734
2725 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2735 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2726 fine-tune banner.
2736 fine-tune banner.
2727
2737
2728 * IPython/numutils.py (spike): Deprecate these spike functions,
2738 * IPython/numutils.py (spike): Deprecate these spike functions,
2729 delete (long deprecated) gnuplot_exec handler.
2739 delete (long deprecated) gnuplot_exec handler.
2730
2740
2731 2004-08-26 Fernando Perez <fperez@colorado.edu>
2741 2004-08-26 Fernando Perez <fperez@colorado.edu>
2732
2742
2733 * ipython.1: Update for threading options, plus some others which
2743 * ipython.1: Update for threading options, plus some others which
2734 were missing.
2744 were missing.
2735
2745
2736 * IPython/ipmaker.py (__call__): Added -wthread option for
2746 * IPython/ipmaker.py (__call__): Added -wthread option for
2737 wxpython thread handling. Make sure threading options are only
2747 wxpython thread handling. Make sure threading options are only
2738 valid at the command line.
2748 valid at the command line.
2739
2749
2740 * scripts/ipython: moved shell selection into a factory function
2750 * scripts/ipython: moved shell selection into a factory function
2741 in Shell.py, to keep the starter script to a minimum.
2751 in Shell.py, to keep the starter script to a minimum.
2742
2752
2743 2004-08-25 Fernando Perez <fperez@colorado.edu>
2753 2004-08-25 Fernando Perez <fperez@colorado.edu>
2744
2754
2745 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2755 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2746 John. Along with some recent changes he made to matplotlib, the
2756 John. Along with some recent changes he made to matplotlib, the
2747 next versions of both systems should work very well together.
2757 next versions of both systems should work very well together.
2748
2758
2749 2004-08-24 Fernando Perez <fperez@colorado.edu>
2759 2004-08-24 Fernando Perez <fperez@colorado.edu>
2750
2760
2751 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2761 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2752 tried to switch the profiling to using hotshot, but I'm getting
2762 tried to switch the profiling to using hotshot, but I'm getting
2753 strange errors from prof.runctx() there. I may be misreading the
2763 strange errors from prof.runctx() there. I may be misreading the
2754 docs, but it looks weird. For now the profiling code will
2764 docs, but it looks weird. For now the profiling code will
2755 continue to use the standard profiler.
2765 continue to use the standard profiler.
2756
2766
2757 2004-08-23 Fernando Perez <fperez@colorado.edu>
2767 2004-08-23 Fernando Perez <fperez@colorado.edu>
2758
2768
2759 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2769 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2760 threaded shell, by John Hunter. It's not quite ready yet, but
2770 threaded shell, by John Hunter. It's not quite ready yet, but
2761 close.
2771 close.
2762
2772
2763 2004-08-22 Fernando Perez <fperez@colorado.edu>
2773 2004-08-22 Fernando Perez <fperez@colorado.edu>
2764
2774
2765 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2775 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2766 in Magic and ultraTB.
2776 in Magic and ultraTB.
2767
2777
2768 * ipython.1: document threading options in manpage.
2778 * ipython.1: document threading options in manpage.
2769
2779
2770 * scripts/ipython: Changed name of -thread option to -gthread,
2780 * scripts/ipython: Changed name of -thread option to -gthread,
2771 since this is GTK specific. I want to leave the door open for a
2781 since this is GTK specific. I want to leave the door open for a
2772 -wthread option for WX, which will most likely be necessary. This
2782 -wthread option for WX, which will most likely be necessary. This
2773 change affects usage and ipmaker as well.
2783 change affects usage and ipmaker as well.
2774
2784
2775 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2785 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2776 handle the matplotlib shell issues. Code by John Hunter
2786 handle the matplotlib shell issues. Code by John Hunter
2777 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2787 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2778 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2788 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2779 broken (and disabled for end users) for now, but it puts the
2789 broken (and disabled for end users) for now, but it puts the
2780 infrastructure in place.
2790 infrastructure in place.
2781
2791
2782 2004-08-21 Fernando Perez <fperez@colorado.edu>
2792 2004-08-21 Fernando Perez <fperez@colorado.edu>
2783
2793
2784 * ipythonrc-pylab: Add matplotlib support.
2794 * ipythonrc-pylab: Add matplotlib support.
2785
2795
2786 * matplotlib_config.py: new files for matplotlib support, part of
2796 * matplotlib_config.py: new files for matplotlib support, part of
2787 the pylab profile.
2797 the pylab profile.
2788
2798
2789 * IPython/usage.py (__doc__): documented the threading options.
2799 * IPython/usage.py (__doc__): documented the threading options.
2790
2800
2791 2004-08-20 Fernando Perez <fperez@colorado.edu>
2801 2004-08-20 Fernando Perez <fperez@colorado.edu>
2792
2802
2793 * ipython: Modified the main calling routine to handle the -thread
2803 * ipython: Modified the main calling routine to handle the -thread
2794 and -mpthread options. This needs to be done as a top-level hack,
2804 and -mpthread options. This needs to be done as a top-level hack,
2795 because it determines which class to instantiate for IPython
2805 because it determines which class to instantiate for IPython
2796 itself.
2806 itself.
2797
2807
2798 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2808 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2799 classes to support multithreaded GTK operation without blocking,
2809 classes to support multithreaded GTK operation without blocking,
2800 and matplotlib with all backends. This is a lot of still very
2810 and matplotlib with all backends. This is a lot of still very
2801 experimental code, and threads are tricky. So it may still have a
2811 experimental code, and threads are tricky. So it may still have a
2802 few rough edges... This code owes a lot to
2812 few rough edges... This code owes a lot to
2803 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2813 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2804 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2814 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2805 to John Hunter for all the matplotlib work.
2815 to John Hunter for all the matplotlib work.
2806
2816
2807 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2817 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2808 options for gtk thread and matplotlib support.
2818 options for gtk thread and matplotlib support.
2809
2819
2810 2004-08-16 Fernando Perez <fperez@colorado.edu>
2820 2004-08-16 Fernando Perez <fperez@colorado.edu>
2811
2821
2812 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2822 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2813 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2823 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2814 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2824 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2815
2825
2816 2004-08-11 Fernando Perez <fperez@colorado.edu>
2826 2004-08-11 Fernando Perez <fperez@colorado.edu>
2817
2827
2818 * setup.py (isfile): Fix build so documentation gets updated for
2828 * setup.py (isfile): Fix build so documentation gets updated for
2819 rpms (it was only done for .tgz builds).
2829 rpms (it was only done for .tgz builds).
2820
2830
2821 2004-08-10 Fernando Perez <fperez@colorado.edu>
2831 2004-08-10 Fernando Perez <fperez@colorado.edu>
2822
2832
2823 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2833 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2824
2834
2825 * iplib.py : Silence syntax error exceptions in tab-completion.
2835 * iplib.py : Silence syntax error exceptions in tab-completion.
2826
2836
2827 2004-08-05 Fernando Perez <fperez@colorado.edu>
2837 2004-08-05 Fernando Perez <fperez@colorado.edu>
2828
2838
2829 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2839 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2830 'color off' mark for continuation prompts. This was causing long
2840 'color off' mark for continuation prompts. This was causing long
2831 continuation lines to mis-wrap.
2841 continuation lines to mis-wrap.
2832
2842
2833 2004-08-01 Fernando Perez <fperez@colorado.edu>
2843 2004-08-01 Fernando Perez <fperez@colorado.edu>
2834
2844
2835 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2845 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2836 for building ipython to be a parameter. All this is necessary
2846 for building ipython to be a parameter. All this is necessary
2837 right now to have a multithreaded version, but this insane
2847 right now to have a multithreaded version, but this insane
2838 non-design will be cleaned up soon. For now, it's a hack that
2848 non-design will be cleaned up soon. For now, it's a hack that
2839 works.
2849 works.
2840
2850
2841 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2851 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2842 args in various places. No bugs so far, but it's a dangerous
2852 args in various places. No bugs so far, but it's a dangerous
2843 practice.
2853 practice.
2844
2854
2845 2004-07-31 Fernando Perez <fperez@colorado.edu>
2855 2004-07-31 Fernando Perez <fperez@colorado.edu>
2846
2856
2847 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2857 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2848 fix completion of files with dots in their names under most
2858 fix completion of files with dots in their names under most
2849 profiles (pysh was OK because the completion order is different).
2859 profiles (pysh was OK because the completion order is different).
2850
2860
2851 2004-07-27 Fernando Perez <fperez@colorado.edu>
2861 2004-07-27 Fernando Perez <fperez@colorado.edu>
2852
2862
2853 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2863 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2854 keywords manually, b/c the one in keyword.py was removed in python
2864 keywords manually, b/c the one in keyword.py was removed in python
2855 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2865 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2856 This is NOT a bug under python 2.3 and earlier.
2866 This is NOT a bug under python 2.3 and earlier.
2857
2867
2858 2004-07-26 Fernando Perez <fperez@colorado.edu>
2868 2004-07-26 Fernando Perez <fperez@colorado.edu>
2859
2869
2860 * IPython/ultraTB.py (VerboseTB.text): Add another
2870 * IPython/ultraTB.py (VerboseTB.text): Add another
2861 linecache.checkcache() call to try to prevent inspect.py from
2871 linecache.checkcache() call to try to prevent inspect.py from
2862 crashing under python 2.3. I think this fixes
2872 crashing under python 2.3. I think this fixes
2863 http://www.scipy.net/roundup/ipython/issue17.
2873 http://www.scipy.net/roundup/ipython/issue17.
2864
2874
2865 2004-07-26 *** Released version 0.6.2
2875 2004-07-26 *** Released version 0.6.2
2866
2876
2867 2004-07-26 Fernando Perez <fperez@colorado.edu>
2877 2004-07-26 Fernando Perez <fperez@colorado.edu>
2868
2878
2869 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2879 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2870 fail for any number.
2880 fail for any number.
2871 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2881 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2872 empty bookmarks.
2882 empty bookmarks.
2873
2883
2874 2004-07-26 *** Released version 0.6.1
2884 2004-07-26 *** Released version 0.6.1
2875
2885
2876 2004-07-26 Fernando Perez <fperez@colorado.edu>
2886 2004-07-26 Fernando Perez <fperez@colorado.edu>
2877
2887
2878 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2888 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2879
2889
2880 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2890 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2881 escaping '()[]{}' in filenames.
2891 escaping '()[]{}' in filenames.
2882
2892
2883 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2893 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2884 Python 2.2 users who lack a proper shlex.split.
2894 Python 2.2 users who lack a proper shlex.split.
2885
2895
2886 2004-07-19 Fernando Perez <fperez@colorado.edu>
2896 2004-07-19 Fernando Perez <fperez@colorado.edu>
2887
2897
2888 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2898 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2889 for reading readline's init file. I follow the normal chain:
2899 for reading readline's init file. I follow the normal chain:
2890 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2900 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2891 report by Mike Heeter. This closes
2901 report by Mike Heeter. This closes
2892 http://www.scipy.net/roundup/ipython/issue16.
2902 http://www.scipy.net/roundup/ipython/issue16.
2893
2903
2894 2004-07-18 Fernando Perez <fperez@colorado.edu>
2904 2004-07-18 Fernando Perez <fperez@colorado.edu>
2895
2905
2896 * IPython/iplib.py (__init__): Add better handling of '\' under
2906 * IPython/iplib.py (__init__): Add better handling of '\' under
2897 Win32 for filenames. After a patch by Ville.
2907 Win32 for filenames. After a patch by Ville.
2898
2908
2899 2004-07-17 Fernando Perez <fperez@colorado.edu>
2909 2004-07-17 Fernando Perez <fperez@colorado.edu>
2900
2910
2901 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2911 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2902 autocalling would be triggered for 'foo is bar' if foo is
2912 autocalling would be triggered for 'foo is bar' if foo is
2903 callable. I also cleaned up the autocall detection code to use a
2913 callable. I also cleaned up the autocall detection code to use a
2904 regexp, which is faster. Bug reported by Alexander Schmolck.
2914 regexp, which is faster. Bug reported by Alexander Schmolck.
2905
2915
2906 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2916 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2907 '?' in them would confuse the help system. Reported by Alex
2917 '?' in them would confuse the help system. Reported by Alex
2908 Schmolck.
2918 Schmolck.
2909
2919
2910 2004-07-16 Fernando Perez <fperez@colorado.edu>
2920 2004-07-16 Fernando Perez <fperez@colorado.edu>
2911
2921
2912 * IPython/GnuplotInteractive.py (__all__): added plot2.
2922 * IPython/GnuplotInteractive.py (__all__): added plot2.
2913
2923
2914 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2924 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2915 plotting dictionaries, lists or tuples of 1d arrays.
2925 plotting dictionaries, lists or tuples of 1d arrays.
2916
2926
2917 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2927 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2918 optimizations.
2928 optimizations.
2919
2929
2920 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2930 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2921 the information which was there from Janko's original IPP code:
2931 the information which was there from Janko's original IPP code:
2922
2932
2923 03.05.99 20:53 porto.ifm.uni-kiel.de
2933 03.05.99 20:53 porto.ifm.uni-kiel.de
2924 --Started changelog.
2934 --Started changelog.
2925 --make clear do what it say it does
2935 --make clear do what it say it does
2926 --added pretty output of lines from inputcache
2936 --added pretty output of lines from inputcache
2927 --Made Logger a mixin class, simplifies handling of switches
2937 --Made Logger a mixin class, simplifies handling of switches
2928 --Added own completer class. .string<TAB> expands to last history
2938 --Added own completer class. .string<TAB> expands to last history
2929 line which starts with string. The new expansion is also present
2939 line which starts with string. The new expansion is also present
2930 with Ctrl-r from the readline library. But this shows, who this
2940 with Ctrl-r from the readline library. But this shows, who this
2931 can be done for other cases.
2941 can be done for other cases.
2932 --Added convention that all shell functions should accept a
2942 --Added convention that all shell functions should accept a
2933 parameter_string This opens the door for different behaviour for
2943 parameter_string This opens the door for different behaviour for
2934 each function. @cd is a good example of this.
2944 each function. @cd is a good example of this.
2935
2945
2936 04.05.99 12:12 porto.ifm.uni-kiel.de
2946 04.05.99 12:12 porto.ifm.uni-kiel.de
2937 --added logfile rotation
2947 --added logfile rotation
2938 --added new mainloop method which freezes first the namespace
2948 --added new mainloop method which freezes first the namespace
2939
2949
2940 07.05.99 21:24 porto.ifm.uni-kiel.de
2950 07.05.99 21:24 porto.ifm.uni-kiel.de
2941 --added the docreader classes. Now there is a help system.
2951 --added the docreader classes. Now there is a help system.
2942 -This is only a first try. Currently it's not easy to put new
2952 -This is only a first try. Currently it's not easy to put new
2943 stuff in the indices. But this is the way to go. Info would be
2953 stuff in the indices. But this is the way to go. Info would be
2944 better, but HTML is every where and not everybody has an info
2954 better, but HTML is every where and not everybody has an info
2945 system installed and it's not so easy to change html-docs to info.
2955 system installed and it's not so easy to change html-docs to info.
2946 --added global logfile option
2956 --added global logfile option
2947 --there is now a hook for object inspection method pinfo needs to
2957 --there is now a hook for object inspection method pinfo needs to
2948 be provided for this. Can be reached by two '??'.
2958 be provided for this. Can be reached by two '??'.
2949
2959
2950 08.05.99 20:51 porto.ifm.uni-kiel.de
2960 08.05.99 20:51 porto.ifm.uni-kiel.de
2951 --added a README
2961 --added a README
2952 --bug in rc file. Something has changed so functions in the rc
2962 --bug in rc file. Something has changed so functions in the rc
2953 file need to reference the shell and not self. Not clear if it's a
2963 file need to reference the shell and not self. Not clear if it's a
2954 bug or feature.
2964 bug or feature.
2955 --changed rc file for new behavior
2965 --changed rc file for new behavior
2956
2966
2957 2004-07-15 Fernando Perez <fperez@colorado.edu>
2967 2004-07-15 Fernando Perez <fperez@colorado.edu>
2958
2968
2959 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2969 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2960 cache was falling out of sync in bizarre manners when multi-line
2970 cache was falling out of sync in bizarre manners when multi-line
2961 input was present. Minor optimizations and cleanup.
2971 input was present. Minor optimizations and cleanup.
2962
2972
2963 (Logger): Remove old Changelog info for cleanup. This is the
2973 (Logger): Remove old Changelog info for cleanup. This is the
2964 information which was there from Janko's original code:
2974 information which was there from Janko's original code:
2965
2975
2966 Changes to Logger: - made the default log filename a parameter
2976 Changes to Logger: - made the default log filename a parameter
2967
2977
2968 - put a check for lines beginning with !@? in log(). Needed
2978 - put a check for lines beginning with !@? in log(). Needed
2969 (even if the handlers properly log their lines) for mid-session
2979 (even if the handlers properly log their lines) for mid-session
2970 logging activation to work properly. Without this, lines logged
2980 logging activation to work properly. Without this, lines logged
2971 in mid session, which get read from the cache, would end up
2981 in mid session, which get read from the cache, would end up
2972 'bare' (with !@? in the open) in the log. Now they are caught
2982 'bare' (with !@? in the open) in the log. Now they are caught
2973 and prepended with a #.
2983 and prepended with a #.
2974
2984
2975 * IPython/iplib.py (InteractiveShell.init_readline): added check
2985 * IPython/iplib.py (InteractiveShell.init_readline): added check
2976 in case MagicCompleter fails to be defined, so we don't crash.
2986 in case MagicCompleter fails to be defined, so we don't crash.
2977
2987
2978 2004-07-13 Fernando Perez <fperez@colorado.edu>
2988 2004-07-13 Fernando Perez <fperez@colorado.edu>
2979
2989
2980 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2990 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2981 of EPS if the requested filename ends in '.eps'.
2991 of EPS if the requested filename ends in '.eps'.
2982
2992
2983 2004-07-04 Fernando Perez <fperez@colorado.edu>
2993 2004-07-04 Fernando Perez <fperez@colorado.edu>
2984
2994
2985 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2995 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2986 escaping of quotes when calling the shell.
2996 escaping of quotes when calling the shell.
2987
2997
2988 2004-07-02 Fernando Perez <fperez@colorado.edu>
2998 2004-07-02 Fernando Perez <fperez@colorado.edu>
2989
2999
2990 * IPython/Prompts.py (CachedOutput.update): Fix problem with
3000 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2991 gettext not working because we were clobbering '_'. Fixes
3001 gettext not working because we were clobbering '_'. Fixes
2992 http://www.scipy.net/roundup/ipython/issue6.
3002 http://www.scipy.net/roundup/ipython/issue6.
2993
3003
2994 2004-07-01 Fernando Perez <fperez@colorado.edu>
3004 2004-07-01 Fernando Perez <fperez@colorado.edu>
2995
3005
2996 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
3006 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2997 into @cd. Patch by Ville.
3007 into @cd. Patch by Ville.
2998
3008
2999 * IPython/iplib.py (InteractiveShell.post_config_initialization):
3009 * IPython/iplib.py (InteractiveShell.post_config_initialization):
3000 new function to store things after ipmaker runs. Patch by Ville.
3010 new function to store things after ipmaker runs. Patch by Ville.
3001 Eventually this will go away once ipmaker is removed and the class
3011 Eventually this will go away once ipmaker is removed and the class
3002 gets cleaned up, but for now it's ok. Key functionality here is
3012 gets cleaned up, but for now it's ok. Key functionality here is
3003 the addition of the persistent storage mechanism, a dict for
3013 the addition of the persistent storage mechanism, a dict for
3004 keeping data across sessions (for now just bookmarks, but more can
3014 keeping data across sessions (for now just bookmarks, but more can
3005 be implemented later).
3015 be implemented later).
3006
3016
3007 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
3017 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
3008 persistent across sections. Patch by Ville, I modified it
3018 persistent across sections. Patch by Ville, I modified it
3009 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
3019 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
3010 added a '-l' option to list all bookmarks.
3020 added a '-l' option to list all bookmarks.
3011
3021
3012 * IPython/iplib.py (InteractiveShell.atexit_operations): new
3022 * IPython/iplib.py (InteractiveShell.atexit_operations): new
3013 center for cleanup. Registered with atexit.register(). I moved
3023 center for cleanup. Registered with atexit.register(). I moved
3014 here the old exit_cleanup(). After a patch by Ville.
3024 here the old exit_cleanup(). After a patch by Ville.
3015
3025
3016 * IPython/Magic.py (get_py_filename): added '~' to the accepted
3026 * IPython/Magic.py (get_py_filename): added '~' to the accepted
3017 characters in the hacked shlex_split for python 2.2.
3027 characters in the hacked shlex_split for python 2.2.
3018
3028
3019 * IPython/iplib.py (file_matches): more fixes to filenames with
3029 * IPython/iplib.py (file_matches): more fixes to filenames with
3020 whitespace in them. It's not perfect, but limitations in python's
3030 whitespace in them. It's not perfect, but limitations in python's
3021 readline make it impossible to go further.
3031 readline make it impossible to go further.
3022
3032
3023 2004-06-29 Fernando Perez <fperez@colorado.edu>
3033 2004-06-29 Fernando Perez <fperez@colorado.edu>
3024
3034
3025 * IPython/iplib.py (file_matches): escape whitespace correctly in
3035 * IPython/iplib.py (file_matches): escape whitespace correctly in
3026 filename completions. Bug reported by Ville.
3036 filename completions. Bug reported by Ville.
3027
3037
3028 2004-06-28 Fernando Perez <fperez@colorado.edu>
3038 2004-06-28 Fernando Perez <fperez@colorado.edu>
3029
3039
3030 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
3040 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
3031 the history file will be called 'history-PROFNAME' (or just
3041 the history file will be called 'history-PROFNAME' (or just
3032 'history' if no profile is loaded). I was getting annoyed at
3042 'history' if no profile is loaded). I was getting annoyed at
3033 getting my Numerical work history clobbered by pysh sessions.
3043 getting my Numerical work history clobbered by pysh sessions.
3034
3044
3035 * IPython/iplib.py (InteractiveShell.__init__): Internal
3045 * IPython/iplib.py (InteractiveShell.__init__): Internal
3036 getoutputerror() function so that we can honor the system_verbose
3046 getoutputerror() function so that we can honor the system_verbose
3037 flag for _all_ system calls. I also added escaping of #
3047 flag for _all_ system calls. I also added escaping of #
3038 characters here to avoid confusing Itpl.
3048 characters here to avoid confusing Itpl.
3039
3049
3040 * IPython/Magic.py (shlex_split): removed call to shell in
3050 * IPython/Magic.py (shlex_split): removed call to shell in
3041 parse_options and replaced it with shlex.split(). The annoying
3051 parse_options and replaced it with shlex.split(). The annoying
3042 part was that in Python 2.2, shlex.split() doesn't exist, so I had
3052 part was that in Python 2.2, shlex.split() doesn't exist, so I had
3043 to backport it from 2.3, with several frail hacks (the shlex
3053 to backport it from 2.3, with several frail hacks (the shlex
3044 module is rather limited in 2.2). Thanks to a suggestion by Ville
3054 module is rather limited in 2.2). Thanks to a suggestion by Ville
3045 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
3055 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
3046 problem.
3056 problem.
3047
3057
3048 (Magic.magic_system_verbose): new toggle to print the actual
3058 (Magic.magic_system_verbose): new toggle to print the actual
3049 system calls made by ipython. Mainly for debugging purposes.
3059 system calls made by ipython. Mainly for debugging purposes.
3050
3060
3051 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
3061 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
3052 doesn't support persistence. Reported (and fix suggested) by
3062 doesn't support persistence. Reported (and fix suggested) by
3053 Travis Caldwell <travis_caldwell2000@yahoo.com>.
3063 Travis Caldwell <travis_caldwell2000@yahoo.com>.
3054
3064
3055 2004-06-26 Fernando Perez <fperez@colorado.edu>
3065 2004-06-26 Fernando Perez <fperez@colorado.edu>
3056
3066
3057 * IPython/Logger.py (Logger.log): fix to handle correctly empty
3067 * IPython/Logger.py (Logger.log): fix to handle correctly empty
3058 continue prompts.
3068 continue prompts.
3059
3069
3060 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
3070 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
3061 function (basically a big docstring) and a few more things here to
3071 function (basically a big docstring) and a few more things here to
3062 speedup startup. pysh.py is now very lightweight. We want because
3072 speedup startup. pysh.py is now very lightweight. We want because
3063 it gets execfile'd, while InterpreterExec gets imported, so
3073 it gets execfile'd, while InterpreterExec gets imported, so
3064 byte-compilation saves time.
3074 byte-compilation saves time.
3065
3075
3066 2004-06-25 Fernando Perez <fperez@colorado.edu>
3076 2004-06-25 Fernando Perez <fperez@colorado.edu>
3067
3077
3068 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
3078 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
3069 -NUM', which was recently broken.
3079 -NUM', which was recently broken.
3070
3080
3071 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
3081 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
3072 in multi-line input (but not !!, which doesn't make sense there).
3082 in multi-line input (but not !!, which doesn't make sense there).
3073
3083
3074 * IPython/UserConfig/ipythonrc: made autoindent on by default.
3084 * IPython/UserConfig/ipythonrc: made autoindent on by default.
3075 It's just too useful, and people can turn it off in the less
3085 It's just too useful, and people can turn it off in the less
3076 common cases where it's a problem.
3086 common cases where it's a problem.
3077
3087
3078 2004-06-24 Fernando Perez <fperez@colorado.edu>
3088 2004-06-24 Fernando Perez <fperez@colorado.edu>
3079
3089
3080 * IPython/iplib.py (InteractiveShell._prefilter): big change -
3090 * IPython/iplib.py (InteractiveShell._prefilter): big change -
3081 special syntaxes (like alias calling) is now allied in multi-line
3091 special syntaxes (like alias calling) is now allied in multi-line
3082 input. This is still _very_ experimental, but it's necessary for
3092 input. This is still _very_ experimental, but it's necessary for
3083 efficient shell usage combining python looping syntax with system
3093 efficient shell usage combining python looping syntax with system
3084 calls. For now it's restricted to aliases, I don't think it
3094 calls. For now it's restricted to aliases, I don't think it
3085 really even makes sense to have this for magics.
3095 really even makes sense to have this for magics.
3086
3096
3087 2004-06-23 Fernando Perez <fperez@colorado.edu>
3097 2004-06-23 Fernando Perez <fperez@colorado.edu>
3088
3098
3089 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
3099 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
3090 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
3100 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
3091
3101
3092 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
3102 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
3093 extensions under Windows (after code sent by Gary Bishop). The
3103 extensions under Windows (after code sent by Gary Bishop). The
3094 extensions considered 'executable' are stored in IPython's rc
3104 extensions considered 'executable' are stored in IPython's rc
3095 structure as win_exec_ext.
3105 structure as win_exec_ext.
3096
3106
3097 * IPython/genutils.py (shell): new function, like system() but
3107 * IPython/genutils.py (shell): new function, like system() but
3098 without return value. Very useful for interactive shell work.
3108 without return value. Very useful for interactive shell work.
3099
3109
3100 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
3110 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
3101 delete aliases.
3111 delete aliases.
3102
3112
3103 * IPython/iplib.py (InteractiveShell.alias_table_update): make
3113 * IPython/iplib.py (InteractiveShell.alias_table_update): make
3104 sure that the alias table doesn't contain python keywords.
3114 sure that the alias table doesn't contain python keywords.
3105
3115
3106 2004-06-21 Fernando Perez <fperez@colorado.edu>
3116 2004-06-21 Fernando Perez <fperez@colorado.edu>
3107
3117
3108 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
3118 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
3109 non-existent items are found in $PATH. Reported by Thorsten.
3119 non-existent items are found in $PATH. Reported by Thorsten.
3110
3120
3111 2004-06-20 Fernando Perez <fperez@colorado.edu>
3121 2004-06-20 Fernando Perez <fperez@colorado.edu>
3112
3122
3113 * IPython/iplib.py (complete): modified the completer so that the
3123 * IPython/iplib.py (complete): modified the completer so that the
3114 order of priorities can be easily changed at runtime.
3124 order of priorities can be easily changed at runtime.
3115
3125
3116 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
3126 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
3117 Modified to auto-execute all lines beginning with '~', '/' or '.'.
3127 Modified to auto-execute all lines beginning with '~', '/' or '.'.
3118
3128
3119 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
3129 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
3120 expand Python variables prepended with $ in all system calls. The
3130 expand Python variables prepended with $ in all system calls. The
3121 same was done to InteractiveShell.handle_shell_escape. Now all
3131 same was done to InteractiveShell.handle_shell_escape. Now all
3122 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
3132 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
3123 expansion of python variables and expressions according to the
3133 expansion of python variables and expressions according to the
3124 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
3134 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
3125
3135
3126 Though PEP-215 has been rejected, a similar (but simpler) one
3136 Though PEP-215 has been rejected, a similar (but simpler) one
3127 seems like it will go into Python 2.4, PEP-292 -
3137 seems like it will go into Python 2.4, PEP-292 -
3128 http://www.python.org/peps/pep-0292.html.
3138 http://www.python.org/peps/pep-0292.html.
3129
3139
3130 I'll keep the full syntax of PEP-215, since IPython has since the
3140 I'll keep the full syntax of PEP-215, since IPython has since the
3131 start used Ka-Ping Yee's reference implementation discussed there
3141 start used Ka-Ping Yee's reference implementation discussed there
3132 (Itpl), and I actually like the powerful semantics it offers.
3142 (Itpl), and I actually like the powerful semantics it offers.
3133
3143
3134 In order to access normal shell variables, the $ has to be escaped
3144 In order to access normal shell variables, the $ has to be escaped
3135 via an extra $. For example:
3145 via an extra $. For example:
3136
3146
3137 In [7]: PATH='a python variable'
3147 In [7]: PATH='a python variable'
3138
3148
3139 In [8]: !echo $PATH
3149 In [8]: !echo $PATH
3140 a python variable
3150 a python variable
3141
3151
3142 In [9]: !echo $$PATH
3152 In [9]: !echo $$PATH
3143 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
3153 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
3144
3154
3145 (Magic.parse_options): escape $ so the shell doesn't evaluate
3155 (Magic.parse_options): escape $ so the shell doesn't evaluate
3146 things prematurely.
3156 things prematurely.
3147
3157
3148 * IPython/iplib.py (InteractiveShell.call_alias): added the
3158 * IPython/iplib.py (InteractiveShell.call_alias): added the
3149 ability for aliases to expand python variables via $.
3159 ability for aliases to expand python variables via $.
3150
3160
3151 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
3161 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
3152 system, now there's a @rehash/@rehashx pair of magics. These work
3162 system, now there's a @rehash/@rehashx pair of magics. These work
3153 like the csh rehash command, and can be invoked at any time. They
3163 like the csh rehash command, and can be invoked at any time. They
3154 build a table of aliases to everything in the user's $PATH
3164 build a table of aliases to everything in the user's $PATH
3155 (@rehash uses everything, @rehashx is slower but only adds
3165 (@rehash uses everything, @rehashx is slower but only adds
3156 executable files). With this, the pysh.py-based shell profile can
3166 executable files). With this, the pysh.py-based shell profile can
3157 now simply call rehash upon startup, and full access to all
3167 now simply call rehash upon startup, and full access to all
3158 programs in the user's path is obtained.
3168 programs in the user's path is obtained.
3159
3169
3160 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
3170 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
3161 functionality is now fully in place. I removed the old dynamic
3171 functionality is now fully in place. I removed the old dynamic
3162 code generation based approach, in favor of a much lighter one
3172 code generation based approach, in favor of a much lighter one
3163 based on a simple dict. The advantage is that this allows me to
3173 based on a simple dict. The advantage is that this allows me to
3164 now have thousands of aliases with negligible cost (unthinkable
3174 now have thousands of aliases with negligible cost (unthinkable
3165 with the old system).
3175 with the old system).
3166
3176
3167 2004-06-19 Fernando Perez <fperez@colorado.edu>
3177 2004-06-19 Fernando Perez <fperez@colorado.edu>
3168
3178
3169 * IPython/iplib.py (__init__): extended MagicCompleter class to
3179 * IPython/iplib.py (__init__): extended MagicCompleter class to
3170 also complete (last in priority) on user aliases.
3180 also complete (last in priority) on user aliases.
3171
3181
3172 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
3182 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
3173 call to eval.
3183 call to eval.
3174 (ItplNS.__init__): Added a new class which functions like Itpl,
3184 (ItplNS.__init__): Added a new class which functions like Itpl,
3175 but allows configuring the namespace for the evaluation to occur
3185 but allows configuring the namespace for the evaluation to occur
3176 in.
3186 in.
3177
3187
3178 2004-06-18 Fernando Perez <fperez@colorado.edu>
3188 2004-06-18 Fernando Perez <fperez@colorado.edu>
3179
3189
3180 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
3190 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
3181 better message when 'exit' or 'quit' are typed (a common newbie
3191 better message when 'exit' or 'quit' are typed (a common newbie
3182 confusion).
3192 confusion).
3183
3193
3184 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
3194 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
3185 check for Windows users.
3195 check for Windows users.
3186
3196
3187 * IPython/iplib.py (InteractiveShell.user_setup): removed
3197 * IPython/iplib.py (InteractiveShell.user_setup): removed
3188 disabling of colors for Windows. I'll test at runtime and issue a
3198 disabling of colors for Windows. I'll test at runtime and issue a
3189 warning if Gary's readline isn't found, as to nudge users to
3199 warning if Gary's readline isn't found, as to nudge users to
3190 download it.
3200 download it.
3191
3201
3192 2004-06-16 Fernando Perez <fperez@colorado.edu>
3202 2004-06-16 Fernando Perez <fperez@colorado.edu>
3193
3203
3194 * IPython/genutils.py (Stream.__init__): changed to print errors
3204 * IPython/genutils.py (Stream.__init__): changed to print errors
3195 to sys.stderr. I had a circular dependency here. Now it's
3205 to sys.stderr. I had a circular dependency here. Now it's
3196 possible to run ipython as IDLE's shell (consider this pre-alpha,
3206 possible to run ipython as IDLE's shell (consider this pre-alpha,
3197 since true stdout things end up in the starting terminal instead
3207 since true stdout things end up in the starting terminal instead
3198 of IDLE's out).
3208 of IDLE's out).
3199
3209
3200 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
3210 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
3201 users who haven't # updated their prompt_in2 definitions. Remove
3211 users who haven't # updated their prompt_in2 definitions. Remove
3202 eventually.
3212 eventually.
3203 (multiple_replace): added credit to original ASPN recipe.
3213 (multiple_replace): added credit to original ASPN recipe.
3204
3214
3205 2004-06-15 Fernando Perez <fperez@colorado.edu>
3215 2004-06-15 Fernando Perez <fperez@colorado.edu>
3206
3216
3207 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
3217 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
3208 list of auto-defined aliases.
3218 list of auto-defined aliases.
3209
3219
3210 2004-06-13 Fernando Perez <fperez@colorado.edu>
3220 2004-06-13 Fernando Perez <fperez@colorado.edu>
3211
3221
3212 * setup.py (scriptfiles): Don't trigger win_post_install unless an
3222 * setup.py (scriptfiles): Don't trigger win_post_install unless an
3213 install was really requested (so setup.py can be used for other
3223 install was really requested (so setup.py can be used for other
3214 things under Windows).
3224 things under Windows).
3215
3225
3216 2004-06-10 Fernando Perez <fperez@colorado.edu>
3226 2004-06-10 Fernando Perez <fperez@colorado.edu>
3217
3227
3218 * IPython/Logger.py (Logger.create_log): Manually remove any old
3228 * IPython/Logger.py (Logger.create_log): Manually remove any old
3219 backup, since os.remove may fail under Windows. Fixes bug
3229 backup, since os.remove may fail under Windows. Fixes bug
3220 reported by Thorsten.
3230 reported by Thorsten.
3221
3231
3222 2004-06-09 Fernando Perez <fperez@colorado.edu>
3232 2004-06-09 Fernando Perez <fperez@colorado.edu>
3223
3233
3224 * examples/example-embed.py: fixed all references to %n (replaced
3234 * examples/example-embed.py: fixed all references to %n (replaced
3225 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
3235 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
3226 for all examples and the manual as well.
3236 for all examples and the manual as well.
3227
3237
3228 2004-06-08 Fernando Perez <fperez@colorado.edu>
3238 2004-06-08 Fernando Perez <fperez@colorado.edu>
3229
3239
3230 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
3240 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
3231 alignment and color management. All 3 prompt subsystems now
3241 alignment and color management. All 3 prompt subsystems now
3232 inherit from BasePrompt.
3242 inherit from BasePrompt.
3233
3243
3234 * tools/release: updates for windows installer build and tag rpms
3244 * tools/release: updates for windows installer build and tag rpms
3235 with python version (since paths are fixed).
3245 with python version (since paths are fixed).
3236
3246
3237 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
3247 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
3238 which will become eventually obsolete. Also fixed the default
3248 which will become eventually obsolete. Also fixed the default
3239 prompt_in2 to use \D, so at least new users start with the correct
3249 prompt_in2 to use \D, so at least new users start with the correct
3240 defaults.
3250 defaults.
3241 WARNING: Users with existing ipythonrc files will need to apply
3251 WARNING: Users with existing ipythonrc files will need to apply
3242 this fix manually!
3252 this fix manually!
3243
3253
3244 * setup.py: make windows installer (.exe). This is finally the
3254 * setup.py: make windows installer (.exe). This is finally the
3245 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
3255 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
3246 which I hadn't included because it required Python 2.3 (or recent
3256 which I hadn't included because it required Python 2.3 (or recent
3247 distutils).
3257 distutils).
3248
3258
3249 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
3259 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
3250 usage of new '\D' escape.
3260 usage of new '\D' escape.
3251
3261
3252 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
3262 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
3253 lacks os.getuid())
3263 lacks os.getuid())
3254 (CachedOutput.set_colors): Added the ability to turn coloring
3264 (CachedOutput.set_colors): Added the ability to turn coloring
3255 on/off with @colors even for manually defined prompt colors. It
3265 on/off with @colors even for manually defined prompt colors. It
3256 uses a nasty global, but it works safely and via the generic color
3266 uses a nasty global, but it works safely and via the generic color
3257 handling mechanism.
3267 handling mechanism.
3258 (Prompt2.__init__): Introduced new escape '\D' for continuation
3268 (Prompt2.__init__): Introduced new escape '\D' for continuation
3259 prompts. It represents the counter ('\#') as dots.
3269 prompts. It represents the counter ('\#') as dots.
3260 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
3270 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
3261 need to update their ipythonrc files and replace '%n' with '\D' in
3271 need to update their ipythonrc files and replace '%n' with '\D' in
3262 their prompt_in2 settings everywhere. Sorry, but there's
3272 their prompt_in2 settings everywhere. Sorry, but there's
3263 otherwise no clean way to get all prompts to properly align. The
3273 otherwise no clean way to get all prompts to properly align. The
3264 ipythonrc shipped with IPython has been updated.
3274 ipythonrc shipped with IPython has been updated.
3265
3275
3266 2004-06-07 Fernando Perez <fperez@colorado.edu>
3276 2004-06-07 Fernando Perez <fperez@colorado.edu>
3267
3277
3268 * setup.py (isfile): Pass local_icons option to latex2html, so the
3278 * setup.py (isfile): Pass local_icons option to latex2html, so the
3269 resulting HTML file is self-contained. Thanks to
3279 resulting HTML file is self-contained. Thanks to
3270 dryice-AT-liu.com.cn for the tip.
3280 dryice-AT-liu.com.cn for the tip.
3271
3281
3272 * pysh.py: I created a new profile 'shell', which implements a
3282 * pysh.py: I created a new profile 'shell', which implements a
3273 _rudimentary_ IPython-based shell. This is in NO WAY a realy
3283 _rudimentary_ IPython-based shell. This is in NO WAY a realy
3274 system shell, nor will it become one anytime soon. It's mainly
3284 system shell, nor will it become one anytime soon. It's mainly
3275 meant to illustrate the use of the new flexible bash-like prompts.
3285 meant to illustrate the use of the new flexible bash-like prompts.
3276 I guess it could be used by hardy souls for true shell management,
3286 I guess it could be used by hardy souls for true shell management,
3277 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
3287 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
3278 profile. This uses the InterpreterExec extension provided by
3288 profile. This uses the InterpreterExec extension provided by
3279 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
3289 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
3280
3290
3281 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
3291 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
3282 auto-align itself with the length of the previous input prompt
3292 auto-align itself with the length of the previous input prompt
3283 (taking into account the invisible color escapes).
3293 (taking into account the invisible color escapes).
3284 (CachedOutput.__init__): Large restructuring of this class. Now
3294 (CachedOutput.__init__): Large restructuring of this class. Now
3285 all three prompts (primary1, primary2, output) are proper objects,
3295 all three prompts (primary1, primary2, output) are proper objects,
3286 managed by the 'parent' CachedOutput class. The code is still a
3296 managed by the 'parent' CachedOutput class. The code is still a
3287 bit hackish (all prompts share state via a pointer to the cache),
3297 bit hackish (all prompts share state via a pointer to the cache),
3288 but it's overall far cleaner than before.
3298 but it's overall far cleaner than before.
3289
3299
3290 * IPython/genutils.py (getoutputerror): modified to add verbose,
3300 * IPython/genutils.py (getoutputerror): modified to add verbose,
3291 debug and header options. This makes the interface of all getout*
3301 debug and header options. This makes the interface of all getout*
3292 functions uniform.
3302 functions uniform.
3293 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
3303 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
3294
3304
3295 * IPython/Magic.py (Magic.default_option): added a function to
3305 * IPython/Magic.py (Magic.default_option): added a function to
3296 allow registering default options for any magic command. This
3306 allow registering default options for any magic command. This
3297 makes it easy to have profiles which customize the magics globally
3307 makes it easy to have profiles which customize the magics globally
3298 for a certain use. The values set through this function are
3308 for a certain use. The values set through this function are
3299 picked up by the parse_options() method, which all magics should
3309 picked up by the parse_options() method, which all magics should
3300 use to parse their options.
3310 use to parse their options.
3301
3311
3302 * IPython/genutils.py (warn): modified the warnings framework to
3312 * IPython/genutils.py (warn): modified the warnings framework to
3303 use the Term I/O class. I'm trying to slowly unify all of
3313 use the Term I/O class. I'm trying to slowly unify all of
3304 IPython's I/O operations to pass through Term.
3314 IPython's I/O operations to pass through Term.
3305
3315
3306 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
3316 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
3307 the secondary prompt to correctly match the length of the primary
3317 the secondary prompt to correctly match the length of the primary
3308 one for any prompt. Now multi-line code will properly line up
3318 one for any prompt. Now multi-line code will properly line up
3309 even for path dependent prompts, such as the new ones available
3319 even for path dependent prompts, such as the new ones available
3310 via the prompt_specials.
3320 via the prompt_specials.
3311
3321
3312 2004-06-06 Fernando Perez <fperez@colorado.edu>
3322 2004-06-06 Fernando Perez <fperez@colorado.edu>
3313
3323
3314 * IPython/Prompts.py (prompt_specials): Added the ability to have
3324 * IPython/Prompts.py (prompt_specials): Added the ability to have
3315 bash-like special sequences in the prompts, which get
3325 bash-like special sequences in the prompts, which get
3316 automatically expanded. Things like hostname, current working
3326 automatically expanded. Things like hostname, current working
3317 directory and username are implemented already, but it's easy to
3327 directory and username are implemented already, but it's easy to
3318 add more in the future. Thanks to a patch by W.J. van der Laan
3328 add more in the future. Thanks to a patch by W.J. van der Laan
3319 <gnufnork-AT-hetdigitalegat.nl>
3329 <gnufnork-AT-hetdigitalegat.nl>
3320 (prompt_specials): Added color support for prompt strings, so
3330 (prompt_specials): Added color support for prompt strings, so
3321 users can define arbitrary color setups for their prompts.
3331 users can define arbitrary color setups for their prompts.
3322
3332
3323 2004-06-05 Fernando Perez <fperez@colorado.edu>
3333 2004-06-05 Fernando Perez <fperez@colorado.edu>
3324
3334
3325 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
3335 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
3326 code to load Gary Bishop's readline and configure it
3336 code to load Gary Bishop's readline and configure it
3327 automatically. Thanks to Gary for help on this.
3337 automatically. Thanks to Gary for help on this.
3328
3338
3329 2004-06-01 Fernando Perez <fperez@colorado.edu>
3339 2004-06-01 Fernando Perez <fperez@colorado.edu>
3330
3340
3331 * IPython/Logger.py (Logger.create_log): fix bug for logging
3341 * IPython/Logger.py (Logger.create_log): fix bug for logging
3332 with no filename (previous fix was incomplete).
3342 with no filename (previous fix was incomplete).
3333
3343
3334 2004-05-25 Fernando Perez <fperez@colorado.edu>
3344 2004-05-25 Fernando Perez <fperez@colorado.edu>
3335
3345
3336 * IPython/Magic.py (Magic.parse_options): fix bug where naked
3346 * IPython/Magic.py (Magic.parse_options): fix bug where naked
3337 parens would get passed to the shell.
3347 parens would get passed to the shell.
3338
3348
3339 2004-05-20 Fernando Perez <fperez@colorado.edu>
3349 2004-05-20 Fernando Perez <fperez@colorado.edu>
3340
3350
3341 * IPython/Magic.py (Magic.magic_prun): changed default profile
3351 * IPython/Magic.py (Magic.magic_prun): changed default profile
3342 sort order to 'time' (the more common profiling need).
3352 sort order to 'time' (the more common profiling need).
3343
3353
3344 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
3354 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
3345 so that source code shown is guaranteed in sync with the file on
3355 so that source code shown is guaranteed in sync with the file on
3346 disk (also changed in psource). Similar fix to the one for
3356 disk (also changed in psource). Similar fix to the one for
3347 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
3357 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
3348 <yann.ledu-AT-noos.fr>.
3358 <yann.ledu-AT-noos.fr>.
3349
3359
3350 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
3360 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
3351 with a single option would not be correctly parsed. Closes
3361 with a single option would not be correctly parsed. Closes
3352 http://www.scipy.net/roundup/ipython/issue14. This bug had been
3362 http://www.scipy.net/roundup/ipython/issue14. This bug had been
3353 introduced in 0.6.0 (on 2004-05-06).
3363 introduced in 0.6.0 (on 2004-05-06).
3354
3364
3355 2004-05-13 *** Released version 0.6.0
3365 2004-05-13 *** Released version 0.6.0
3356
3366
3357 2004-05-13 Fernando Perez <fperez@colorado.edu>
3367 2004-05-13 Fernando Perez <fperez@colorado.edu>
3358
3368
3359 * debian/: Added debian/ directory to CVS, so that debian support
3369 * debian/: Added debian/ directory to CVS, so that debian support
3360 is publicly accessible. The debian package is maintained by Jack
3370 is publicly accessible. The debian package is maintained by Jack
3361 Moffit <jack-AT-xiph.org>.
3371 Moffit <jack-AT-xiph.org>.
3362
3372
3363 * Documentation: included the notes about an ipython-based system
3373 * Documentation: included the notes about an ipython-based system
3364 shell (the hypothetical 'pysh') into the new_design.pdf document,
3374 shell (the hypothetical 'pysh') into the new_design.pdf document,
3365 so that these ideas get distributed to users along with the
3375 so that these ideas get distributed to users along with the
3366 official documentation.
3376 official documentation.
3367
3377
3368 2004-05-10 Fernando Perez <fperez@colorado.edu>
3378 2004-05-10 Fernando Perez <fperez@colorado.edu>
3369
3379
3370 * IPython/Logger.py (Logger.create_log): fix recently introduced
3380 * IPython/Logger.py (Logger.create_log): fix recently introduced
3371 bug (misindented line) where logstart would fail when not given an
3381 bug (misindented line) where logstart would fail when not given an
3372 explicit filename.
3382 explicit filename.
3373
3383
3374 2004-05-09 Fernando Perez <fperez@colorado.edu>
3384 2004-05-09 Fernando Perez <fperez@colorado.edu>
3375
3385
3376 * IPython/Magic.py (Magic.parse_options): skip system call when
3386 * IPython/Magic.py (Magic.parse_options): skip system call when
3377 there are no options to look for. Faster, cleaner for the common
3387 there are no options to look for. Faster, cleaner for the common
3378 case.
3388 case.
3379
3389
3380 * Documentation: many updates to the manual: describing Windows
3390 * Documentation: many updates to the manual: describing Windows
3381 support better, Gnuplot updates, credits, misc small stuff. Also
3391 support better, Gnuplot updates, credits, misc small stuff. Also
3382 updated the new_design doc a bit.
3392 updated the new_design doc a bit.
3383
3393
3384 2004-05-06 *** Released version 0.6.0.rc1
3394 2004-05-06 *** Released version 0.6.0.rc1
3385
3395
3386 2004-05-06 Fernando Perez <fperez@colorado.edu>
3396 2004-05-06 Fernando Perez <fperez@colorado.edu>
3387
3397
3388 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
3398 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
3389 operations to use the vastly more efficient list/''.join() method.
3399 operations to use the vastly more efficient list/''.join() method.
3390 (FormattedTB.text): Fix
3400 (FormattedTB.text): Fix
3391 http://www.scipy.net/roundup/ipython/issue12 - exception source
3401 http://www.scipy.net/roundup/ipython/issue12 - exception source
3392 extract not updated after reload. Thanks to Mike Salib
3402 extract not updated after reload. Thanks to Mike Salib
3393 <msalib-AT-mit.edu> for pinning the source of the problem.
3403 <msalib-AT-mit.edu> for pinning the source of the problem.
3394 Fortunately, the solution works inside ipython and doesn't require
3404 Fortunately, the solution works inside ipython and doesn't require
3395 any changes to python proper.
3405 any changes to python proper.
3396
3406
3397 * IPython/Magic.py (Magic.parse_options): Improved to process the
3407 * IPython/Magic.py (Magic.parse_options): Improved to process the
3398 argument list as a true shell would (by actually using the
3408 argument list as a true shell would (by actually using the
3399 underlying system shell). This way, all @magics automatically get
3409 underlying system shell). This way, all @magics automatically get
3400 shell expansion for variables. Thanks to a comment by Alex
3410 shell expansion for variables. Thanks to a comment by Alex
3401 Schmolck.
3411 Schmolck.
3402
3412
3403 2004-04-04 Fernando Perez <fperez@colorado.edu>
3413 2004-04-04 Fernando Perez <fperez@colorado.edu>
3404
3414
3405 * IPython/iplib.py (InteractiveShell.interact): Added a special
3415 * IPython/iplib.py (InteractiveShell.interact): Added a special
3406 trap for a debugger quit exception, which is basically impossible
3416 trap for a debugger quit exception, which is basically impossible
3407 to handle by normal mechanisms, given what pdb does to the stack.
3417 to handle by normal mechanisms, given what pdb does to the stack.
3408 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
3418 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
3409
3419
3410 2004-04-03 Fernando Perez <fperez@colorado.edu>
3420 2004-04-03 Fernando Perez <fperez@colorado.edu>
3411
3421
3412 * IPython/genutils.py (Term): Standardized the names of the Term
3422 * IPython/genutils.py (Term): Standardized the names of the Term
3413 class streams to cin/cout/cerr, following C++ naming conventions
3423 class streams to cin/cout/cerr, following C++ naming conventions
3414 (I can't use in/out/err because 'in' is not a valid attribute
3424 (I can't use in/out/err because 'in' is not a valid attribute
3415 name).
3425 name).
3416
3426
3417 * IPython/iplib.py (InteractiveShell.interact): don't increment
3427 * IPython/iplib.py (InteractiveShell.interact): don't increment
3418 the prompt if there's no user input. By Daniel 'Dang' Griffith
3428 the prompt if there's no user input. By Daniel 'Dang' Griffith
3419 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
3429 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
3420 Francois Pinard.
3430 Francois Pinard.
3421
3431
3422 2004-04-02 Fernando Perez <fperez@colorado.edu>
3432 2004-04-02 Fernando Perez <fperez@colorado.edu>
3423
3433
3424 * IPython/genutils.py (Stream.__init__): Modified to survive at
3434 * IPython/genutils.py (Stream.__init__): Modified to survive at
3425 least importing in contexts where stdin/out/err aren't true file
3435 least importing in contexts where stdin/out/err aren't true file
3426 objects, such as PyCrust (they lack fileno() and mode). However,
3436 objects, such as PyCrust (they lack fileno() and mode). However,
3427 the recovery facilities which rely on these things existing will
3437 the recovery facilities which rely on these things existing will
3428 not work.
3438 not work.
3429
3439
3430 2004-04-01 Fernando Perez <fperez@colorado.edu>
3440 2004-04-01 Fernando Perez <fperez@colorado.edu>
3431
3441
3432 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
3442 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
3433 use the new getoutputerror() function, so it properly
3443 use the new getoutputerror() function, so it properly
3434 distinguishes stdout/err.
3444 distinguishes stdout/err.
3435
3445
3436 * IPython/genutils.py (getoutputerror): added a function to
3446 * IPython/genutils.py (getoutputerror): added a function to
3437 capture separately the standard output and error of a command.
3447 capture separately the standard output and error of a command.
3438 After a comment from dang on the mailing lists. This code is
3448 After a comment from dang on the mailing lists. This code is
3439 basically a modified version of commands.getstatusoutput(), from
3449 basically a modified version of commands.getstatusoutput(), from
3440 the standard library.
3450 the standard library.
3441
3451
3442 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
3452 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
3443 '!!' as a special syntax (shorthand) to access @sx.
3453 '!!' as a special syntax (shorthand) to access @sx.
3444
3454
3445 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
3455 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
3446 command and return its output as a list split on '\n'.
3456 command and return its output as a list split on '\n'.
3447
3457
3448 2004-03-31 Fernando Perez <fperez@colorado.edu>
3458 2004-03-31 Fernando Perez <fperez@colorado.edu>
3449
3459
3450 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
3460 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
3451 method to dictionaries used as FakeModule instances if they lack
3461 method to dictionaries used as FakeModule instances if they lack
3452 it. At least pydoc in python2.3 breaks for runtime-defined
3462 it. At least pydoc in python2.3 breaks for runtime-defined
3453 functions without this hack. At some point I need to _really_
3463 functions without this hack. At some point I need to _really_
3454 understand what FakeModule is doing, because it's a gross hack.
3464 understand what FakeModule is doing, because it's a gross hack.
3455 But it solves Arnd's problem for now...
3465 But it solves Arnd's problem for now...
3456
3466
3457 2004-02-27 Fernando Perez <fperez@colorado.edu>
3467 2004-02-27 Fernando Perez <fperez@colorado.edu>
3458
3468
3459 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
3469 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
3460 mode would behave erratically. Also increased the number of
3470 mode would behave erratically. Also increased the number of
3461 possible logs in rotate mod to 999. Thanks to Rod Holland
3471 possible logs in rotate mod to 999. Thanks to Rod Holland
3462 <rhh@StructureLABS.com> for the report and fixes.
3472 <rhh@StructureLABS.com> for the report and fixes.
3463
3473
3464 2004-02-26 Fernando Perez <fperez@colorado.edu>
3474 2004-02-26 Fernando Perez <fperez@colorado.edu>
3465
3475
3466 * IPython/genutils.py (page): Check that the curses module really
3476 * IPython/genutils.py (page): Check that the curses module really
3467 has the initscr attribute before trying to use it. For some
3477 has the initscr attribute before trying to use it. For some
3468 reason, the Solaris curses module is missing this. I think this
3478 reason, the Solaris curses module is missing this. I think this
3469 should be considered a Solaris python bug, but I'm not sure.
3479 should be considered a Solaris python bug, but I'm not sure.
3470
3480
3471 2004-01-17 Fernando Perez <fperez@colorado.edu>
3481 2004-01-17 Fernando Perez <fperez@colorado.edu>
3472
3482
3473 * IPython/genutils.py (Stream.__init__): Changes to try to make
3483 * IPython/genutils.py (Stream.__init__): Changes to try to make
3474 ipython robust against stdin/out/err being closed by the user.
3484 ipython robust against stdin/out/err being closed by the user.
3475 This is 'user error' (and blocks a normal python session, at least
3485 This is 'user error' (and blocks a normal python session, at least
3476 the stdout case). However, Ipython should be able to survive such
3486 the stdout case). However, Ipython should be able to survive such
3477 instances of abuse as gracefully as possible. To simplify the
3487 instances of abuse as gracefully as possible. To simplify the
3478 coding and maintain compatibility with Gary Bishop's Term
3488 coding and maintain compatibility with Gary Bishop's Term
3479 contributions, I've made use of classmethods for this. I think
3489 contributions, I've made use of classmethods for this. I think
3480 this introduces a dependency on python 2.2.
3490 this introduces a dependency on python 2.2.
3481
3491
3482 2004-01-13 Fernando Perez <fperez@colorado.edu>
3492 2004-01-13 Fernando Perez <fperez@colorado.edu>
3483
3493
3484 * IPython/numutils.py (exp_safe): simplified the code a bit and
3494 * IPython/numutils.py (exp_safe): simplified the code a bit and
3485 removed the need for importing the kinds module altogether.
3495 removed the need for importing the kinds module altogether.
3486
3496
3487 2004-01-06 Fernando Perez <fperez@colorado.edu>
3497 2004-01-06 Fernando Perez <fperez@colorado.edu>
3488
3498
3489 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3499 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3490 a magic function instead, after some community feedback. No
3500 a magic function instead, after some community feedback. No
3491 special syntax will exist for it, but its name is deliberately
3501 special syntax will exist for it, but its name is deliberately
3492 very short.
3502 very short.
3493
3503
3494 2003-12-20 Fernando Perez <fperez@colorado.edu>
3504 2003-12-20 Fernando Perez <fperez@colorado.edu>
3495
3505
3496 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3506 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3497 new functionality, to automagically assign the result of a shell
3507 new functionality, to automagically assign the result of a shell
3498 command to a variable. I'll solicit some community feedback on
3508 command to a variable. I'll solicit some community feedback on
3499 this before making it permanent.
3509 this before making it permanent.
3500
3510
3501 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3511 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3502 requested about callables for which inspect couldn't obtain a
3512 requested about callables for which inspect couldn't obtain a
3503 proper argspec. Thanks to a crash report sent by Etienne
3513 proper argspec. Thanks to a crash report sent by Etienne
3504 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3514 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3505
3515
3506 2003-12-09 Fernando Perez <fperez@colorado.edu>
3516 2003-12-09 Fernando Perez <fperez@colorado.edu>
3507
3517
3508 * IPython/genutils.py (page): patch for the pager to work across
3518 * IPython/genutils.py (page): patch for the pager to work across
3509 various versions of Windows. By Gary Bishop.
3519 various versions of Windows. By Gary Bishop.
3510
3520
3511 2003-12-04 Fernando Perez <fperez@colorado.edu>
3521 2003-12-04 Fernando Perez <fperez@colorado.edu>
3512
3522
3513 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3523 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3514 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3524 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3515 While I tested this and it looks ok, there may still be corner
3525 While I tested this and it looks ok, there may still be corner
3516 cases I've missed.
3526 cases I've missed.
3517
3527
3518 2003-12-01 Fernando Perez <fperez@colorado.edu>
3528 2003-12-01 Fernando Perez <fperez@colorado.edu>
3519
3529
3520 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3530 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3521 where a line like 'p,q=1,2' would fail because the automagic
3531 where a line like 'p,q=1,2' would fail because the automagic
3522 system would be triggered for @p.
3532 system would be triggered for @p.
3523
3533
3524 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3534 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3525 cleanups, code unmodified.
3535 cleanups, code unmodified.
3526
3536
3527 * IPython/genutils.py (Term): added a class for IPython to handle
3537 * IPython/genutils.py (Term): added a class for IPython to handle
3528 output. In most cases it will just be a proxy for stdout/err, but
3538 output. In most cases it will just be a proxy for stdout/err, but
3529 having this allows modifications to be made for some platforms,
3539 having this allows modifications to be made for some platforms,
3530 such as handling color escapes under Windows. All of this code
3540 such as handling color escapes under Windows. All of this code
3531 was contributed by Gary Bishop, with minor modifications by me.
3541 was contributed by Gary Bishop, with minor modifications by me.
3532 The actual changes affect many files.
3542 The actual changes affect many files.
3533
3543
3534 2003-11-30 Fernando Perez <fperez@colorado.edu>
3544 2003-11-30 Fernando Perez <fperez@colorado.edu>
3535
3545
3536 * IPython/iplib.py (file_matches): new completion code, courtesy
3546 * IPython/iplib.py (file_matches): new completion code, courtesy
3537 of Jeff Collins. This enables filename completion again under
3547 of Jeff Collins. This enables filename completion again under
3538 python 2.3, which disabled it at the C level.
3548 python 2.3, which disabled it at the C level.
3539
3549
3540 2003-11-11 Fernando Perez <fperez@colorado.edu>
3550 2003-11-11 Fernando Perez <fperez@colorado.edu>
3541
3551
3542 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3552 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3543 for Numeric.array(map(...)), but often convenient.
3553 for Numeric.array(map(...)), but often convenient.
3544
3554
3545 2003-11-05 Fernando Perez <fperez@colorado.edu>
3555 2003-11-05 Fernando Perez <fperez@colorado.edu>
3546
3556
3547 * IPython/numutils.py (frange): Changed a call from int() to
3557 * IPython/numutils.py (frange): Changed a call from int() to
3548 int(round()) to prevent a problem reported with arange() in the
3558 int(round()) to prevent a problem reported with arange() in the
3549 numpy list.
3559 numpy list.
3550
3560
3551 2003-10-06 Fernando Perez <fperez@colorado.edu>
3561 2003-10-06 Fernando Perez <fperez@colorado.edu>
3552
3562
3553 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3563 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3554 prevent crashes if sys lacks an argv attribute (it happens with
3564 prevent crashes if sys lacks an argv attribute (it happens with
3555 embedded interpreters which build a bare-bones sys module).
3565 embedded interpreters which build a bare-bones sys module).
3556 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3566 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3557
3567
3558 2003-09-24 Fernando Perez <fperez@colorado.edu>
3568 2003-09-24 Fernando Perez <fperez@colorado.edu>
3559
3569
3560 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3570 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3561 to protect against poorly written user objects where __getattr__
3571 to protect against poorly written user objects where __getattr__
3562 raises exceptions other than AttributeError. Thanks to a bug
3572 raises exceptions other than AttributeError. Thanks to a bug
3563 report by Oliver Sander <osander-AT-gmx.de>.
3573 report by Oliver Sander <osander-AT-gmx.de>.
3564
3574
3565 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3575 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3566 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3576 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3567
3577
3568 2003-09-09 Fernando Perez <fperez@colorado.edu>
3578 2003-09-09 Fernando Perez <fperez@colorado.edu>
3569
3579
3570 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3580 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3571 unpacking a list whith a callable as first element would
3581 unpacking a list whith a callable as first element would
3572 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3582 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3573 Collins.
3583 Collins.
3574
3584
3575 2003-08-25 *** Released version 0.5.0
3585 2003-08-25 *** Released version 0.5.0
3576
3586
3577 2003-08-22 Fernando Perez <fperez@colorado.edu>
3587 2003-08-22 Fernando Perez <fperez@colorado.edu>
3578
3588
3579 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3589 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3580 improperly defined user exceptions. Thanks to feedback from Mark
3590 improperly defined user exceptions. Thanks to feedback from Mark
3581 Russell <mrussell-AT-verio.net>.
3591 Russell <mrussell-AT-verio.net>.
3582
3592
3583 2003-08-20 Fernando Perez <fperez@colorado.edu>
3593 2003-08-20 Fernando Perez <fperez@colorado.edu>
3584
3594
3585 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3595 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3586 printing so that it would print multi-line string forms starting
3596 printing so that it would print multi-line string forms starting
3587 with a new line. This way the formatting is better respected for
3597 with a new line. This way the formatting is better respected for
3588 objects which work hard to make nice string forms.
3598 objects which work hard to make nice string forms.
3589
3599
3590 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3600 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3591 autocall would overtake data access for objects with both
3601 autocall would overtake data access for objects with both
3592 __getitem__ and __call__.
3602 __getitem__ and __call__.
3593
3603
3594 2003-08-19 *** Released version 0.5.0-rc1
3604 2003-08-19 *** Released version 0.5.0-rc1
3595
3605
3596 2003-08-19 Fernando Perez <fperez@colorado.edu>
3606 2003-08-19 Fernando Perez <fperez@colorado.edu>
3597
3607
3598 * IPython/deep_reload.py (load_tail): single tiny change here
3608 * IPython/deep_reload.py (load_tail): single tiny change here
3599 seems to fix the long-standing bug of dreload() failing to work
3609 seems to fix the long-standing bug of dreload() failing to work
3600 for dotted names. But this module is pretty tricky, so I may have
3610 for dotted names. But this module is pretty tricky, so I may have
3601 missed some subtlety. Needs more testing!.
3611 missed some subtlety. Needs more testing!.
3602
3612
3603 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3613 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3604 exceptions which have badly implemented __str__ methods.
3614 exceptions which have badly implemented __str__ methods.
3605 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3615 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3606 which I've been getting reports about from Python 2.3 users. I
3616 which I've been getting reports about from Python 2.3 users. I
3607 wish I had a simple test case to reproduce the problem, so I could
3617 wish I had a simple test case to reproduce the problem, so I could
3608 either write a cleaner workaround or file a bug report if
3618 either write a cleaner workaround or file a bug report if
3609 necessary.
3619 necessary.
3610
3620
3611 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3621 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3612 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3622 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3613 a bug report by Tjabo Kloppenburg.
3623 a bug report by Tjabo Kloppenburg.
3614
3624
3615 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3625 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3616 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3626 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3617 seems rather unstable. Thanks to a bug report by Tjabo
3627 seems rather unstable. Thanks to a bug report by Tjabo
3618 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3628 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3619
3629
3620 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3630 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3621 this out soon because of the critical fixes in the inner loop for
3631 this out soon because of the critical fixes in the inner loop for
3622 generators.
3632 generators.
3623
3633
3624 * IPython/Magic.py (Magic.getargspec): removed. This (and
3634 * IPython/Magic.py (Magic.getargspec): removed. This (and
3625 _get_def) have been obsoleted by OInspect for a long time, I
3635 _get_def) have been obsoleted by OInspect for a long time, I
3626 hadn't noticed that they were dead code.
3636 hadn't noticed that they were dead code.
3627 (Magic._ofind): restored _ofind functionality for a few literals
3637 (Magic._ofind): restored _ofind functionality for a few literals
3628 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3638 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3629 for things like "hello".capitalize?, since that would require a
3639 for things like "hello".capitalize?, since that would require a
3630 potentially dangerous eval() again.
3640 potentially dangerous eval() again.
3631
3641
3632 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3642 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3633 logic a bit more to clean up the escapes handling and minimize the
3643 logic a bit more to clean up the escapes handling and minimize the
3634 use of _ofind to only necessary cases. The interactive 'feel' of
3644 use of _ofind to only necessary cases. The interactive 'feel' of
3635 IPython should have improved quite a bit with the changes in
3645 IPython should have improved quite a bit with the changes in
3636 _prefilter and _ofind (besides being far safer than before).
3646 _prefilter and _ofind (besides being far safer than before).
3637
3647
3638 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3648 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3639 obscure, never reported). Edit would fail to find the object to
3649 obscure, never reported). Edit would fail to find the object to
3640 edit under some circumstances.
3650 edit under some circumstances.
3641 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3651 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3642 which were causing double-calling of generators. Those eval calls
3652 which were causing double-calling of generators. Those eval calls
3643 were _very_ dangerous, since code with side effects could be
3653 were _very_ dangerous, since code with side effects could be
3644 triggered. As they say, 'eval is evil'... These were the
3654 triggered. As they say, 'eval is evil'... These were the
3645 nastiest evals in IPython. Besides, _ofind is now far simpler,
3655 nastiest evals in IPython. Besides, _ofind is now far simpler,
3646 and it should also be quite a bit faster. Its use of inspect is
3656 and it should also be quite a bit faster. Its use of inspect is
3647 also safer, so perhaps some of the inspect-related crashes I've
3657 also safer, so perhaps some of the inspect-related crashes I've
3648 seen lately with Python 2.3 might be taken care of. That will
3658 seen lately with Python 2.3 might be taken care of. That will
3649 need more testing.
3659 need more testing.
3650
3660
3651 2003-08-17 Fernando Perez <fperez@colorado.edu>
3661 2003-08-17 Fernando Perez <fperez@colorado.edu>
3652
3662
3653 * IPython/iplib.py (InteractiveShell._prefilter): significant
3663 * IPython/iplib.py (InteractiveShell._prefilter): significant
3654 simplifications to the logic for handling user escapes. Faster
3664 simplifications to the logic for handling user escapes. Faster
3655 and simpler code.
3665 and simpler code.
3656
3666
3657 2003-08-14 Fernando Perez <fperez@colorado.edu>
3667 2003-08-14 Fernando Perez <fperez@colorado.edu>
3658
3668
3659 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3669 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3660 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3670 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3661 but it should be quite a bit faster. And the recursive version
3671 but it should be quite a bit faster. And the recursive version
3662 generated O(log N) intermediate storage for all rank>1 arrays,
3672 generated O(log N) intermediate storage for all rank>1 arrays,
3663 even if they were contiguous.
3673 even if they were contiguous.
3664 (l1norm): Added this function.
3674 (l1norm): Added this function.
3665 (norm): Added this function for arbitrary norms (including
3675 (norm): Added this function for arbitrary norms (including
3666 l-infinity). l1 and l2 are still special cases for convenience
3676 l-infinity). l1 and l2 are still special cases for convenience
3667 and speed.
3677 and speed.
3668
3678
3669 2003-08-03 Fernando Perez <fperez@colorado.edu>
3679 2003-08-03 Fernando Perez <fperez@colorado.edu>
3670
3680
3671 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3681 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3672 exceptions, which now raise PendingDeprecationWarnings in Python
3682 exceptions, which now raise PendingDeprecationWarnings in Python
3673 2.3. There were some in Magic and some in Gnuplot2.
3683 2.3. There were some in Magic and some in Gnuplot2.
3674
3684
3675 2003-06-30 Fernando Perez <fperez@colorado.edu>
3685 2003-06-30 Fernando Perez <fperez@colorado.edu>
3676
3686
3677 * IPython/genutils.py (page): modified to call curses only for
3687 * IPython/genutils.py (page): modified to call curses only for
3678 terminals where TERM=='xterm'. After problems under many other
3688 terminals where TERM=='xterm'. After problems under many other
3679 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3689 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3680
3690
3681 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3691 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3682 would be triggered when readline was absent. This was just an old
3692 would be triggered when readline was absent. This was just an old
3683 debugging statement I'd forgotten to take out.
3693 debugging statement I'd forgotten to take out.
3684
3694
3685 2003-06-20 Fernando Perez <fperez@colorado.edu>
3695 2003-06-20 Fernando Perez <fperez@colorado.edu>
3686
3696
3687 * IPython/genutils.py (clock): modified to return only user time
3697 * IPython/genutils.py (clock): modified to return only user time
3688 (not counting system time), after a discussion on scipy. While
3698 (not counting system time), after a discussion on scipy. While
3689 system time may be a useful quantity occasionally, it may much
3699 system time may be a useful quantity occasionally, it may much
3690 more easily be skewed by occasional swapping or other similar
3700 more easily be skewed by occasional swapping or other similar
3691 activity.
3701 activity.
3692
3702
3693 2003-06-05 Fernando Perez <fperez@colorado.edu>
3703 2003-06-05 Fernando Perez <fperez@colorado.edu>
3694
3704
3695 * IPython/numutils.py (identity): new function, for building
3705 * IPython/numutils.py (identity): new function, for building
3696 arbitrary rank Kronecker deltas (mostly backwards compatible with
3706 arbitrary rank Kronecker deltas (mostly backwards compatible with
3697 Numeric.identity)
3707 Numeric.identity)
3698
3708
3699 2003-06-03 Fernando Perez <fperez@colorado.edu>
3709 2003-06-03 Fernando Perez <fperez@colorado.edu>
3700
3710
3701 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3711 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3702 arguments passed to magics with spaces, to allow trailing '\' to
3712 arguments passed to magics with spaces, to allow trailing '\' to
3703 work normally (mainly for Windows users).
3713 work normally (mainly for Windows users).
3704
3714
3705 2003-05-29 Fernando Perez <fperez@colorado.edu>
3715 2003-05-29 Fernando Perez <fperez@colorado.edu>
3706
3716
3707 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3717 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3708 instead of pydoc.help. This fixes a bizarre behavior where
3718 instead of pydoc.help. This fixes a bizarre behavior where
3709 printing '%s' % locals() would trigger the help system. Now
3719 printing '%s' % locals() would trigger the help system. Now
3710 ipython behaves like normal python does.
3720 ipython behaves like normal python does.
3711
3721
3712 Note that if one does 'from pydoc import help', the bizarre
3722 Note that if one does 'from pydoc import help', the bizarre
3713 behavior returns, but this will also happen in normal python, so
3723 behavior returns, but this will also happen in normal python, so
3714 it's not an ipython bug anymore (it has to do with how pydoc.help
3724 it's not an ipython bug anymore (it has to do with how pydoc.help
3715 is implemented).
3725 is implemented).
3716
3726
3717 2003-05-22 Fernando Perez <fperez@colorado.edu>
3727 2003-05-22 Fernando Perez <fperez@colorado.edu>
3718
3728
3719 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3729 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3720 return [] instead of None when nothing matches, also match to end
3730 return [] instead of None when nothing matches, also match to end
3721 of line. Patch by Gary Bishop.
3731 of line. Patch by Gary Bishop.
3722
3732
3723 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3733 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3724 protection as before, for files passed on the command line. This
3734 protection as before, for files passed on the command line. This
3725 prevents the CrashHandler from kicking in if user files call into
3735 prevents the CrashHandler from kicking in if user files call into
3726 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3736 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3727 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3737 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3728
3738
3729 2003-05-20 *** Released version 0.4.0
3739 2003-05-20 *** Released version 0.4.0
3730
3740
3731 2003-05-20 Fernando Perez <fperez@colorado.edu>
3741 2003-05-20 Fernando Perez <fperez@colorado.edu>
3732
3742
3733 * setup.py: added support for manpages. It's a bit hackish b/c of
3743 * setup.py: added support for manpages. It's a bit hackish b/c of
3734 a bug in the way the bdist_rpm distutils target handles gzipped
3744 a bug in the way the bdist_rpm distutils target handles gzipped
3735 manpages, but it works. After a patch by Jack.
3745 manpages, but it works. After a patch by Jack.
3736
3746
3737 2003-05-19 Fernando Perez <fperez@colorado.edu>
3747 2003-05-19 Fernando Perez <fperez@colorado.edu>
3738
3748
3739 * IPython/numutils.py: added a mockup of the kinds module, since
3749 * IPython/numutils.py: added a mockup of the kinds module, since
3740 it was recently removed from Numeric. This way, numutils will
3750 it was recently removed from Numeric. This way, numutils will
3741 work for all users even if they are missing kinds.
3751 work for all users even if they are missing kinds.
3742
3752
3743 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3753 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3744 failure, which can occur with SWIG-wrapped extensions. After a
3754 failure, which can occur with SWIG-wrapped extensions. After a
3745 crash report from Prabhu.
3755 crash report from Prabhu.
3746
3756
3747 2003-05-16 Fernando Perez <fperez@colorado.edu>
3757 2003-05-16 Fernando Perez <fperez@colorado.edu>
3748
3758
3749 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3759 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3750 protect ipython from user code which may call directly
3760 protect ipython from user code which may call directly
3751 sys.excepthook (this looks like an ipython crash to the user, even
3761 sys.excepthook (this looks like an ipython crash to the user, even
3752 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3762 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3753 This is especially important to help users of WxWindows, but may
3763 This is especially important to help users of WxWindows, but may
3754 also be useful in other cases.
3764 also be useful in other cases.
3755
3765
3756 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3766 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3757 an optional tb_offset to be specified, and to preserve exception
3767 an optional tb_offset to be specified, and to preserve exception
3758 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3768 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3759
3769
3760 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3770 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3761
3771
3762 2003-05-15 Fernando Perez <fperez@colorado.edu>
3772 2003-05-15 Fernando Perez <fperez@colorado.edu>
3763
3773
3764 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3774 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3765 installing for a new user under Windows.
3775 installing for a new user under Windows.
3766
3776
3767 2003-05-12 Fernando Perez <fperez@colorado.edu>
3777 2003-05-12 Fernando Perez <fperez@colorado.edu>
3768
3778
3769 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3779 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3770 handler for Emacs comint-based lines. Currently it doesn't do
3780 handler for Emacs comint-based lines. Currently it doesn't do
3771 much (but importantly, it doesn't update the history cache). In
3781 much (but importantly, it doesn't update the history cache). In
3772 the future it may be expanded if Alex needs more functionality
3782 the future it may be expanded if Alex needs more functionality
3773 there.
3783 there.
3774
3784
3775 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3785 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3776 info to crash reports.
3786 info to crash reports.
3777
3787
3778 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3788 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3779 just like Python's -c. Also fixed crash with invalid -color
3789 just like Python's -c. Also fixed crash with invalid -color
3780 option value at startup. Thanks to Will French
3790 option value at startup. Thanks to Will French
3781 <wfrench-AT-bestweb.net> for the bug report.
3791 <wfrench-AT-bestweb.net> for the bug report.
3782
3792
3783 2003-05-09 Fernando Perez <fperez@colorado.edu>
3793 2003-05-09 Fernando Perez <fperez@colorado.edu>
3784
3794
3785 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3795 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3786 to EvalDict (it's a mapping, after all) and simplified its code
3796 to EvalDict (it's a mapping, after all) and simplified its code
3787 quite a bit, after a nice discussion on c.l.py where Gustavo
3797 quite a bit, after a nice discussion on c.l.py where Gustavo
3788 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3798 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3789
3799
3790 2003-04-30 Fernando Perez <fperez@colorado.edu>
3800 2003-04-30 Fernando Perez <fperez@colorado.edu>
3791
3801
3792 * IPython/genutils.py (timings_out): modified it to reduce its
3802 * IPython/genutils.py (timings_out): modified it to reduce its
3793 overhead in the common reps==1 case.
3803 overhead in the common reps==1 case.
3794
3804
3795 2003-04-29 Fernando Perez <fperez@colorado.edu>
3805 2003-04-29 Fernando Perez <fperez@colorado.edu>
3796
3806
3797 * IPython/genutils.py (timings_out): Modified to use the resource
3807 * IPython/genutils.py (timings_out): Modified to use the resource
3798 module, which avoids the wraparound problems of time.clock().
3808 module, which avoids the wraparound problems of time.clock().
3799
3809
3800 2003-04-17 *** Released version 0.2.15pre4
3810 2003-04-17 *** Released version 0.2.15pre4
3801
3811
3802 2003-04-17 Fernando Perez <fperez@colorado.edu>
3812 2003-04-17 Fernando Perez <fperez@colorado.edu>
3803
3813
3804 * setup.py (scriptfiles): Split windows-specific stuff over to a
3814 * setup.py (scriptfiles): Split windows-specific stuff over to a
3805 separate file, in an attempt to have a Windows GUI installer.
3815 separate file, in an attempt to have a Windows GUI installer.
3806 That didn't work, but part of the groundwork is done.
3816 That didn't work, but part of the groundwork is done.
3807
3817
3808 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3818 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3809 indent/unindent with 4 spaces. Particularly useful in combination
3819 indent/unindent with 4 spaces. Particularly useful in combination
3810 with the new auto-indent option.
3820 with the new auto-indent option.
3811
3821
3812 2003-04-16 Fernando Perez <fperez@colorado.edu>
3822 2003-04-16 Fernando Perez <fperez@colorado.edu>
3813
3823
3814 * IPython/Magic.py: various replacements of self.rc for
3824 * IPython/Magic.py: various replacements of self.rc for
3815 self.shell.rc. A lot more remains to be done to fully disentangle
3825 self.shell.rc. A lot more remains to be done to fully disentangle
3816 this class from the main Shell class.
3826 this class from the main Shell class.
3817
3827
3818 * IPython/GnuplotRuntime.py: added checks for mouse support so
3828 * IPython/GnuplotRuntime.py: added checks for mouse support so
3819 that we don't try to enable it if the current gnuplot doesn't
3829 that we don't try to enable it if the current gnuplot doesn't
3820 really support it. Also added checks so that we don't try to
3830 really support it. Also added checks so that we don't try to
3821 enable persist under Windows (where Gnuplot doesn't recognize the
3831 enable persist under Windows (where Gnuplot doesn't recognize the
3822 option).
3832 option).
3823
3833
3824 * IPython/iplib.py (InteractiveShell.interact): Added optional
3834 * IPython/iplib.py (InteractiveShell.interact): Added optional
3825 auto-indenting code, after a patch by King C. Shu
3835 auto-indenting code, after a patch by King C. Shu
3826 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3836 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3827 get along well with pasting indented code. If I ever figure out
3837 get along well with pasting indented code. If I ever figure out
3828 how to make that part go well, it will become on by default.
3838 how to make that part go well, it will become on by default.
3829
3839
3830 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3840 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3831 crash ipython if there was an unmatched '%' in the user's prompt
3841 crash ipython if there was an unmatched '%' in the user's prompt
3832 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3842 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3833
3843
3834 * IPython/iplib.py (InteractiveShell.interact): removed the
3844 * IPython/iplib.py (InteractiveShell.interact): removed the
3835 ability to ask the user whether he wants to crash or not at the
3845 ability to ask the user whether he wants to crash or not at the
3836 'last line' exception handler. Calling functions at that point
3846 'last line' exception handler. Calling functions at that point
3837 changes the stack, and the error reports would have incorrect
3847 changes the stack, and the error reports would have incorrect
3838 tracebacks.
3848 tracebacks.
3839
3849
3840 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3850 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3841 pass through a peger a pretty-printed form of any object. After a
3851 pass through a peger a pretty-printed form of any object. After a
3842 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3852 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3843
3853
3844 2003-04-14 Fernando Perez <fperez@colorado.edu>
3854 2003-04-14 Fernando Perez <fperez@colorado.edu>
3845
3855
3846 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3856 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3847 all files in ~ would be modified at first install (instead of
3857 all files in ~ would be modified at first install (instead of
3848 ~/.ipython). This could be potentially disastrous, as the
3858 ~/.ipython). This could be potentially disastrous, as the
3849 modification (make line-endings native) could damage binary files.
3859 modification (make line-endings native) could damage binary files.
3850
3860
3851 2003-04-10 Fernando Perez <fperez@colorado.edu>
3861 2003-04-10 Fernando Perez <fperez@colorado.edu>
3852
3862
3853 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3863 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3854 handle only lines which are invalid python. This now means that
3864 handle only lines which are invalid python. This now means that
3855 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3865 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3856 for the bug report.
3866 for the bug report.
3857
3867
3858 2003-04-01 Fernando Perez <fperez@colorado.edu>
3868 2003-04-01 Fernando Perez <fperez@colorado.edu>
3859
3869
3860 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3870 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3861 where failing to set sys.last_traceback would crash pdb.pm().
3871 where failing to set sys.last_traceback would crash pdb.pm().
3862 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3872 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3863 report.
3873 report.
3864
3874
3865 2003-03-25 Fernando Perez <fperez@colorado.edu>
3875 2003-03-25 Fernando Perez <fperez@colorado.edu>
3866
3876
3867 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3877 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3868 before printing it (it had a lot of spurious blank lines at the
3878 before printing it (it had a lot of spurious blank lines at the
3869 end).
3879 end).
3870
3880
3871 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3881 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3872 output would be sent 21 times! Obviously people don't use this
3882 output would be sent 21 times! Obviously people don't use this
3873 too often, or I would have heard about it.
3883 too often, or I would have heard about it.
3874
3884
3875 2003-03-24 Fernando Perez <fperez@colorado.edu>
3885 2003-03-24 Fernando Perez <fperez@colorado.edu>
3876
3886
3877 * setup.py (scriptfiles): renamed the data_files parameter from
3887 * setup.py (scriptfiles): renamed the data_files parameter from
3878 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3888 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3879 for the patch.
3889 for the patch.
3880
3890
3881 2003-03-20 Fernando Perez <fperez@colorado.edu>
3891 2003-03-20 Fernando Perez <fperez@colorado.edu>
3882
3892
3883 * IPython/genutils.py (error): added error() and fatal()
3893 * IPython/genutils.py (error): added error() and fatal()
3884 functions.
3894 functions.
3885
3895
3886 2003-03-18 *** Released version 0.2.15pre3
3896 2003-03-18 *** Released version 0.2.15pre3
3887
3897
3888 2003-03-18 Fernando Perez <fperez@colorado.edu>
3898 2003-03-18 Fernando Perez <fperez@colorado.edu>
3889
3899
3890 * setupext/install_data_ext.py
3900 * setupext/install_data_ext.py
3891 (install_data_ext.initialize_options): Class contributed by Jack
3901 (install_data_ext.initialize_options): Class contributed by Jack
3892 Moffit for fixing the old distutils hack. He is sending this to
3902 Moffit for fixing the old distutils hack. He is sending this to
3893 the distutils folks so in the future we may not need it as a
3903 the distutils folks so in the future we may not need it as a
3894 private fix.
3904 private fix.
3895
3905
3896 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3906 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3897 changes for Debian packaging. See his patch for full details.
3907 changes for Debian packaging. See his patch for full details.
3898 The old distutils hack of making the ipythonrc* files carry a
3908 The old distutils hack of making the ipythonrc* files carry a
3899 bogus .py extension is gone, at last. Examples were moved to a
3909 bogus .py extension is gone, at last. Examples were moved to a
3900 separate subdir under doc/, and the separate executable scripts
3910 separate subdir under doc/, and the separate executable scripts
3901 now live in their own directory. Overall a great cleanup. The
3911 now live in their own directory. Overall a great cleanup. The
3902 manual was updated to use the new files, and setup.py has been
3912 manual was updated to use the new files, and setup.py has been
3903 fixed for this setup.
3913 fixed for this setup.
3904
3914
3905 * IPython/PyColorize.py (Parser.usage): made non-executable and
3915 * IPython/PyColorize.py (Parser.usage): made non-executable and
3906 created a pycolor wrapper around it to be included as a script.
3916 created a pycolor wrapper around it to be included as a script.
3907
3917
3908 2003-03-12 *** Released version 0.2.15pre2
3918 2003-03-12 *** Released version 0.2.15pre2
3909
3919
3910 2003-03-12 Fernando Perez <fperez@colorado.edu>
3920 2003-03-12 Fernando Perez <fperez@colorado.edu>
3911
3921
3912 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3922 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3913 long-standing problem with garbage characters in some terminals.
3923 long-standing problem with garbage characters in some terminals.
3914 The issue was really that the \001 and \002 escapes must _only_ be
3924 The issue was really that the \001 and \002 escapes must _only_ be
3915 passed to input prompts (which call readline), but _never_ to
3925 passed to input prompts (which call readline), but _never_ to
3916 normal text to be printed on screen. I changed ColorANSI to have
3926 normal text to be printed on screen. I changed ColorANSI to have
3917 two classes: TermColors and InputTermColors, each with the
3927 two classes: TermColors and InputTermColors, each with the
3918 appropriate escapes for input prompts or normal text. The code in
3928 appropriate escapes for input prompts or normal text. The code in
3919 Prompts.py got slightly more complicated, but this very old and
3929 Prompts.py got slightly more complicated, but this very old and
3920 annoying bug is finally fixed.
3930 annoying bug is finally fixed.
3921
3931
3922 All the credit for nailing down the real origin of this problem
3932 All the credit for nailing down the real origin of this problem
3923 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3933 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3924 *Many* thanks to him for spending quite a bit of effort on this.
3934 *Many* thanks to him for spending quite a bit of effort on this.
3925
3935
3926 2003-03-05 *** Released version 0.2.15pre1
3936 2003-03-05 *** Released version 0.2.15pre1
3927
3937
3928 2003-03-03 Fernando Perez <fperez@colorado.edu>
3938 2003-03-03 Fernando Perez <fperez@colorado.edu>
3929
3939
3930 * IPython/FakeModule.py: Moved the former _FakeModule to a
3940 * IPython/FakeModule.py: Moved the former _FakeModule to a
3931 separate file, because it's also needed by Magic (to fix a similar
3941 separate file, because it's also needed by Magic (to fix a similar
3932 pickle-related issue in @run).
3942 pickle-related issue in @run).
3933
3943
3934 2003-03-02 Fernando Perez <fperez@colorado.edu>
3944 2003-03-02 Fernando Perez <fperez@colorado.edu>
3935
3945
3936 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3946 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3937 the autocall option at runtime.
3947 the autocall option at runtime.
3938 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3948 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3939 across Magic.py to start separating Magic from InteractiveShell.
3949 across Magic.py to start separating Magic from InteractiveShell.
3940 (Magic._ofind): Fixed to return proper namespace for dotted
3950 (Magic._ofind): Fixed to return proper namespace for dotted
3941 names. Before, a dotted name would always return 'not currently
3951 names. Before, a dotted name would always return 'not currently
3942 defined', because it would find the 'parent'. s.x would be found,
3952 defined', because it would find the 'parent'. s.x would be found,
3943 but since 'x' isn't defined by itself, it would get confused.
3953 but since 'x' isn't defined by itself, it would get confused.
3944 (Magic.magic_run): Fixed pickling problems reported by Ralf
3954 (Magic.magic_run): Fixed pickling problems reported by Ralf
3945 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3955 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3946 that I'd used when Mike Heeter reported similar issues at the
3956 that I'd used when Mike Heeter reported similar issues at the
3947 top-level, but now for @run. It boils down to injecting the
3957 top-level, but now for @run. It boils down to injecting the
3948 namespace where code is being executed with something that looks
3958 namespace where code is being executed with something that looks
3949 enough like a module to fool pickle.dump(). Since a pickle stores
3959 enough like a module to fool pickle.dump(). Since a pickle stores
3950 a named reference to the importing module, we need this for
3960 a named reference to the importing module, we need this for
3951 pickles to save something sensible.
3961 pickles to save something sensible.
3952
3962
3953 * IPython/ipmaker.py (make_IPython): added an autocall option.
3963 * IPython/ipmaker.py (make_IPython): added an autocall option.
3954
3964
3955 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3965 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3956 the auto-eval code. Now autocalling is an option, and the code is
3966 the auto-eval code. Now autocalling is an option, and the code is
3957 also vastly safer. There is no more eval() involved at all.
3967 also vastly safer. There is no more eval() involved at all.
3958
3968
3959 2003-03-01 Fernando Perez <fperez@colorado.edu>
3969 2003-03-01 Fernando Perez <fperez@colorado.edu>
3960
3970
3961 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3971 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3962 dict with named keys instead of a tuple.
3972 dict with named keys instead of a tuple.
3963
3973
3964 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3974 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3965
3975
3966 * setup.py (make_shortcut): Fixed message about directories
3976 * setup.py (make_shortcut): Fixed message about directories
3967 created during Windows installation (the directories were ok, just
3977 created during Windows installation (the directories were ok, just
3968 the printed message was misleading). Thanks to Chris Liechti
3978 the printed message was misleading). Thanks to Chris Liechti
3969 <cliechti-AT-gmx.net> for the heads up.
3979 <cliechti-AT-gmx.net> for the heads up.
3970
3980
3971 2003-02-21 Fernando Perez <fperez@colorado.edu>
3981 2003-02-21 Fernando Perez <fperez@colorado.edu>
3972
3982
3973 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3983 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3974 of ValueError exception when checking for auto-execution. This
3984 of ValueError exception when checking for auto-execution. This
3975 one is raised by things like Numeric arrays arr.flat when the
3985 one is raised by things like Numeric arrays arr.flat when the
3976 array is non-contiguous.
3986 array is non-contiguous.
3977
3987
3978 2003-01-31 Fernando Perez <fperez@colorado.edu>
3988 2003-01-31 Fernando Perez <fperez@colorado.edu>
3979
3989
3980 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3990 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3981 not return any value at all (even though the command would get
3991 not return any value at all (even though the command would get
3982 executed).
3992 executed).
3983 (xsys): Flush stdout right after printing the command to ensure
3993 (xsys): Flush stdout right after printing the command to ensure
3984 proper ordering of commands and command output in the total
3994 proper ordering of commands and command output in the total
3985 output.
3995 output.
3986 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3996 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3987 system/getoutput as defaults. The old ones are kept for
3997 system/getoutput as defaults. The old ones are kept for
3988 compatibility reasons, so no code which uses this library needs
3998 compatibility reasons, so no code which uses this library needs
3989 changing.
3999 changing.
3990
4000
3991 2003-01-27 *** Released version 0.2.14
4001 2003-01-27 *** Released version 0.2.14
3992
4002
3993 2003-01-25 Fernando Perez <fperez@colorado.edu>
4003 2003-01-25 Fernando Perez <fperez@colorado.edu>
3994
4004
3995 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
4005 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3996 functions defined in previous edit sessions could not be re-edited
4006 functions defined in previous edit sessions could not be re-edited
3997 (because the temp files were immediately removed). Now temp files
4007 (because the temp files were immediately removed). Now temp files
3998 are removed only at IPython's exit.
4008 are removed only at IPython's exit.
3999 (Magic.magic_run): Improved @run to perform shell-like expansions
4009 (Magic.magic_run): Improved @run to perform shell-like expansions
4000 on its arguments (~users and $VARS). With this, @run becomes more
4010 on its arguments (~users and $VARS). With this, @run becomes more
4001 like a normal command-line.
4011 like a normal command-line.
4002
4012
4003 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
4013 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
4004 bugs related to embedding and cleaned up that code. A fairly
4014 bugs related to embedding and cleaned up that code. A fairly
4005 important one was the impossibility to access the global namespace
4015 important one was the impossibility to access the global namespace
4006 through the embedded IPython (only local variables were visible).
4016 through the embedded IPython (only local variables were visible).
4007
4017
4008 2003-01-14 Fernando Perez <fperez@colorado.edu>
4018 2003-01-14 Fernando Perez <fperez@colorado.edu>
4009
4019
4010 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
4020 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
4011 auto-calling to be a bit more conservative. Now it doesn't get
4021 auto-calling to be a bit more conservative. Now it doesn't get
4012 triggered if any of '!=()<>' are in the rest of the input line, to
4022 triggered if any of '!=()<>' are in the rest of the input line, to
4013 allow comparing callables. Thanks to Alex for the heads up.
4023 allow comparing callables. Thanks to Alex for the heads up.
4014
4024
4015 2003-01-07 Fernando Perez <fperez@colorado.edu>
4025 2003-01-07 Fernando Perez <fperez@colorado.edu>
4016
4026
4017 * IPython/genutils.py (page): fixed estimation of the number of
4027 * IPython/genutils.py (page): fixed estimation of the number of
4018 lines in a string to be paged to simply count newlines. This
4028 lines in a string to be paged to simply count newlines. This
4019 prevents over-guessing due to embedded escape sequences. A better
4029 prevents over-guessing due to embedded escape sequences. A better
4020 long-term solution would involve stripping out the control chars
4030 long-term solution would involve stripping out the control chars
4021 for the count, but it's potentially so expensive I just don't
4031 for the count, but it's potentially so expensive I just don't
4022 think it's worth doing.
4032 think it's worth doing.
4023
4033
4024 2002-12-19 *** Released version 0.2.14pre50
4034 2002-12-19 *** Released version 0.2.14pre50
4025
4035
4026 2002-12-19 Fernando Perez <fperez@colorado.edu>
4036 2002-12-19 Fernando Perez <fperez@colorado.edu>
4027
4037
4028 * tools/release (version): Changed release scripts to inform
4038 * tools/release (version): Changed release scripts to inform
4029 Andrea and build a NEWS file with a list of recent changes.
4039 Andrea and build a NEWS file with a list of recent changes.
4030
4040
4031 * IPython/ColorANSI.py (__all__): changed terminal detection
4041 * IPython/ColorANSI.py (__all__): changed terminal detection
4032 code. Seems to work better for xterms without breaking
4042 code. Seems to work better for xterms without breaking
4033 konsole. Will need more testing to determine if WinXP and Mac OSX
4043 konsole. Will need more testing to determine if WinXP and Mac OSX
4034 also work ok.
4044 also work ok.
4035
4045
4036 2002-12-18 *** Released version 0.2.14pre49
4046 2002-12-18 *** Released version 0.2.14pre49
4037
4047
4038 2002-12-18 Fernando Perez <fperez@colorado.edu>
4048 2002-12-18 Fernando Perez <fperez@colorado.edu>
4039
4049
4040 * Docs: added new info about Mac OSX, from Andrea.
4050 * Docs: added new info about Mac OSX, from Andrea.
4041
4051
4042 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
4052 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
4043 allow direct plotting of python strings whose format is the same
4053 allow direct plotting of python strings whose format is the same
4044 of gnuplot data files.
4054 of gnuplot data files.
4045
4055
4046 2002-12-16 Fernando Perez <fperez@colorado.edu>
4056 2002-12-16 Fernando Perez <fperez@colorado.edu>
4047
4057
4048 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
4058 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
4049 value of exit question to be acknowledged.
4059 value of exit question to be acknowledged.
4050
4060
4051 2002-12-03 Fernando Perez <fperez@colorado.edu>
4061 2002-12-03 Fernando Perez <fperez@colorado.edu>
4052
4062
4053 * IPython/ipmaker.py: removed generators, which had been added
4063 * IPython/ipmaker.py: removed generators, which had been added
4054 by mistake in an earlier debugging run. This was causing trouble
4064 by mistake in an earlier debugging run. This was causing trouble
4055 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
4065 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
4056 for pointing this out.
4066 for pointing this out.
4057
4067
4058 2002-11-17 Fernando Perez <fperez@colorado.edu>
4068 2002-11-17 Fernando Perez <fperez@colorado.edu>
4059
4069
4060 * Manual: updated the Gnuplot section.
4070 * Manual: updated the Gnuplot section.
4061
4071
4062 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
4072 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
4063 a much better split of what goes in Runtime and what goes in
4073 a much better split of what goes in Runtime and what goes in
4064 Interactive.
4074 Interactive.
4065
4075
4066 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
4076 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
4067 being imported from iplib.
4077 being imported from iplib.
4068
4078
4069 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
4079 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
4070 for command-passing. Now the global Gnuplot instance is called
4080 for command-passing. Now the global Gnuplot instance is called
4071 'gp' instead of 'g', which was really a far too fragile and
4081 'gp' instead of 'g', which was really a far too fragile and
4072 common name.
4082 common name.
4073
4083
4074 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
4084 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
4075 bounding boxes generated by Gnuplot for square plots.
4085 bounding boxes generated by Gnuplot for square plots.
4076
4086
4077 * IPython/genutils.py (popkey): new function added. I should
4087 * IPython/genutils.py (popkey): new function added. I should
4078 suggest this on c.l.py as a dict method, it seems useful.
4088 suggest this on c.l.py as a dict method, it seems useful.
4079
4089
4080 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
4090 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
4081 to transparently handle PostScript generation. MUCH better than
4091 to transparently handle PostScript generation. MUCH better than
4082 the previous plot_eps/replot_eps (which I removed now). The code
4092 the previous plot_eps/replot_eps (which I removed now). The code
4083 is also fairly clean and well documented now (including
4093 is also fairly clean and well documented now (including
4084 docstrings).
4094 docstrings).
4085
4095
4086 2002-11-13 Fernando Perez <fperez@colorado.edu>
4096 2002-11-13 Fernando Perez <fperez@colorado.edu>
4087
4097
4088 * IPython/Magic.py (Magic.magic_edit): fixed docstring
4098 * IPython/Magic.py (Magic.magic_edit): fixed docstring
4089 (inconsistent with options).
4099 (inconsistent with options).
4090
4100
4091 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
4101 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
4092 manually disabled, I don't know why. Fixed it.
4102 manually disabled, I don't know why. Fixed it.
4093 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
4103 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
4094 eps output.
4104 eps output.
4095
4105
4096 2002-11-12 Fernando Perez <fperez@colorado.edu>
4106 2002-11-12 Fernando Perez <fperez@colorado.edu>
4097
4107
4098 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
4108 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
4099 don't propagate up to caller. Fixes crash reported by François
4109 don't propagate up to caller. Fixes crash reported by François
4100 Pinard.
4110 Pinard.
4101
4111
4102 2002-11-09 Fernando Perez <fperez@colorado.edu>
4112 2002-11-09 Fernando Perez <fperez@colorado.edu>
4103
4113
4104 * IPython/ipmaker.py (make_IPython): fixed problem with writing
4114 * IPython/ipmaker.py (make_IPython): fixed problem with writing
4105 history file for new users.
4115 history file for new users.
4106 (make_IPython): fixed bug where initial install would leave the
4116 (make_IPython): fixed bug where initial install would leave the
4107 user running in the .ipython dir.
4117 user running in the .ipython dir.
4108 (make_IPython): fixed bug where config dir .ipython would be
4118 (make_IPython): fixed bug where config dir .ipython would be
4109 created regardless of the given -ipythondir option. Thanks to Cory
4119 created regardless of the given -ipythondir option. Thanks to Cory
4110 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
4120 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
4111
4121
4112 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
4122 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
4113 type confirmations. Will need to use it in all of IPython's code
4123 type confirmations. Will need to use it in all of IPython's code
4114 consistently.
4124 consistently.
4115
4125
4116 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
4126 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
4117 context to print 31 lines instead of the default 5. This will make
4127 context to print 31 lines instead of the default 5. This will make
4118 the crash reports extremely detailed in case the problem is in
4128 the crash reports extremely detailed in case the problem is in
4119 libraries I don't have access to.
4129 libraries I don't have access to.
4120
4130
4121 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
4131 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
4122 line of defense' code to still crash, but giving users fair
4132 line of defense' code to still crash, but giving users fair
4123 warning. I don't want internal errors to go unreported: if there's
4133 warning. I don't want internal errors to go unreported: if there's
4124 an internal problem, IPython should crash and generate a full
4134 an internal problem, IPython should crash and generate a full
4125 report.
4135 report.
4126
4136
4127 2002-11-08 Fernando Perez <fperez@colorado.edu>
4137 2002-11-08 Fernando Perez <fperez@colorado.edu>
4128
4138
4129 * IPython/iplib.py (InteractiveShell.interact): added code to trap
4139 * IPython/iplib.py (InteractiveShell.interact): added code to trap
4130 otherwise uncaught exceptions which can appear if people set
4140 otherwise uncaught exceptions which can appear if people set
4131 sys.stdout to something badly broken. Thanks to a crash report
4141 sys.stdout to something badly broken. Thanks to a crash report
4132 from henni-AT-mail.brainbot.com.
4142 from henni-AT-mail.brainbot.com.
4133
4143
4134 2002-11-04 Fernando Perez <fperez@colorado.edu>
4144 2002-11-04 Fernando Perez <fperez@colorado.edu>
4135
4145
4136 * IPython/iplib.py (InteractiveShell.interact): added
4146 * IPython/iplib.py (InteractiveShell.interact): added
4137 __IPYTHON__active to the builtins. It's a flag which goes on when
4147 __IPYTHON__active to the builtins. It's a flag which goes on when
4138 the interaction starts and goes off again when it stops. This
4148 the interaction starts and goes off again when it stops. This
4139 allows embedding code to detect being inside IPython. Before this
4149 allows embedding code to detect being inside IPython. Before this
4140 was done via __IPYTHON__, but that only shows that an IPython
4150 was done via __IPYTHON__, but that only shows that an IPython
4141 instance has been created.
4151 instance has been created.
4142
4152
4143 * IPython/Magic.py (Magic.magic_env): I realized that in a
4153 * IPython/Magic.py (Magic.magic_env): I realized that in a
4144 UserDict, instance.data holds the data as a normal dict. So I
4154 UserDict, instance.data holds the data as a normal dict. So I
4145 modified @env to return os.environ.data instead of rebuilding a
4155 modified @env to return os.environ.data instead of rebuilding a
4146 dict by hand.
4156 dict by hand.
4147
4157
4148 2002-11-02 Fernando Perez <fperez@colorado.edu>
4158 2002-11-02 Fernando Perez <fperez@colorado.edu>
4149
4159
4150 * IPython/genutils.py (warn): changed so that level 1 prints no
4160 * IPython/genutils.py (warn): changed so that level 1 prints no
4151 header. Level 2 is now the default (with 'WARNING' header, as
4161 header. Level 2 is now the default (with 'WARNING' header, as
4152 before). I think I tracked all places where changes were needed in
4162 before). I think I tracked all places where changes were needed in
4153 IPython, but outside code using the old level numbering may have
4163 IPython, but outside code using the old level numbering may have
4154 broken.
4164 broken.
4155
4165
4156 * IPython/iplib.py (InteractiveShell.runcode): added this to
4166 * IPython/iplib.py (InteractiveShell.runcode): added this to
4157 handle the tracebacks in SystemExit traps correctly. The previous
4167 handle the tracebacks in SystemExit traps correctly. The previous
4158 code (through interact) was printing more of the stack than
4168 code (through interact) was printing more of the stack than
4159 necessary, showing IPython internal code to the user.
4169 necessary, showing IPython internal code to the user.
4160
4170
4161 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
4171 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
4162 default. Now that the default at the confirmation prompt is yes,
4172 default. Now that the default at the confirmation prompt is yes,
4163 it's not so intrusive. François' argument that ipython sessions
4173 it's not so intrusive. François' argument that ipython sessions
4164 tend to be complex enough not to lose them from an accidental C-d,
4174 tend to be complex enough not to lose them from an accidental C-d,
4165 is a valid one.
4175 is a valid one.
4166
4176
4167 * IPython/iplib.py (InteractiveShell.interact): added a
4177 * IPython/iplib.py (InteractiveShell.interact): added a
4168 showtraceback() call to the SystemExit trap, and modified the exit
4178 showtraceback() call to the SystemExit trap, and modified the exit
4169 confirmation to have yes as the default.
4179 confirmation to have yes as the default.
4170
4180
4171 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
4181 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
4172 this file. It's been gone from the code for a long time, this was
4182 this file. It's been gone from the code for a long time, this was
4173 simply leftover junk.
4183 simply leftover junk.
4174
4184
4175 2002-11-01 Fernando Perez <fperez@colorado.edu>
4185 2002-11-01 Fernando Perez <fperez@colorado.edu>
4176
4186
4177 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
4187 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
4178 added. If set, IPython now traps EOF and asks for
4188 added. If set, IPython now traps EOF and asks for
4179 confirmation. After a request by François Pinard.
4189 confirmation. After a request by François Pinard.
4180
4190
4181 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
4191 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
4182 of @abort, and with a new (better) mechanism for handling the
4192 of @abort, and with a new (better) mechanism for handling the
4183 exceptions.
4193 exceptions.
4184
4194
4185 2002-10-27 Fernando Perez <fperez@colorado.edu>
4195 2002-10-27 Fernando Perez <fperez@colorado.edu>
4186
4196
4187 * IPython/usage.py (__doc__): updated the --help information and
4197 * IPython/usage.py (__doc__): updated the --help information and
4188 the ipythonrc file to indicate that -log generates
4198 the ipythonrc file to indicate that -log generates
4189 ./ipython.log. Also fixed the corresponding info in @logstart.
4199 ./ipython.log. Also fixed the corresponding info in @logstart.
4190 This and several other fixes in the manuals thanks to reports by
4200 This and several other fixes in the manuals thanks to reports by
4191 François Pinard <pinard-AT-iro.umontreal.ca>.
4201 François Pinard <pinard-AT-iro.umontreal.ca>.
4192
4202
4193 * IPython/Logger.py (Logger.switch_log): Fixed error message to
4203 * IPython/Logger.py (Logger.switch_log): Fixed error message to
4194 refer to @logstart (instead of @log, which doesn't exist).
4204 refer to @logstart (instead of @log, which doesn't exist).
4195
4205
4196 * IPython/iplib.py (InteractiveShell._prefilter): fixed
4206 * IPython/iplib.py (InteractiveShell._prefilter): fixed
4197 AttributeError crash. Thanks to Christopher Armstrong
4207 AttributeError crash. Thanks to Christopher Armstrong
4198 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
4208 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
4199 introduced recently (in 0.2.14pre37) with the fix to the eval
4209 introduced recently (in 0.2.14pre37) with the fix to the eval
4200 problem mentioned below.
4210 problem mentioned below.
4201
4211
4202 2002-10-17 Fernando Perez <fperez@colorado.edu>
4212 2002-10-17 Fernando Perez <fperez@colorado.edu>
4203
4213
4204 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
4214 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
4205 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
4215 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
4206
4216
4207 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
4217 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
4208 this function to fix a problem reported by Alex Schmolck. He saw
4218 this function to fix a problem reported by Alex Schmolck. He saw
4209 it with list comprehensions and generators, which were getting
4219 it with list comprehensions and generators, which were getting
4210 called twice. The real problem was an 'eval' call in testing for
4220 called twice. The real problem was an 'eval' call in testing for
4211 automagic which was evaluating the input line silently.
4221 automagic which was evaluating the input line silently.
4212
4222
4213 This is a potentially very nasty bug, if the input has side
4223 This is a potentially very nasty bug, if the input has side
4214 effects which must not be repeated. The code is much cleaner now,
4224 effects which must not be repeated. The code is much cleaner now,
4215 without any blanket 'except' left and with a regexp test for
4225 without any blanket 'except' left and with a regexp test for
4216 actual function names.
4226 actual function names.
4217
4227
4218 But an eval remains, which I'm not fully comfortable with. I just
4228 But an eval remains, which I'm not fully comfortable with. I just
4219 don't know how to find out if an expression could be a callable in
4229 don't know how to find out if an expression could be a callable in
4220 the user's namespace without doing an eval on the string. However
4230 the user's namespace without doing an eval on the string. However
4221 that string is now much more strictly checked so that no code
4231 that string is now much more strictly checked so that no code
4222 slips by, so the eval should only happen for things that can
4232 slips by, so the eval should only happen for things that can
4223 really be only function/method names.
4233 really be only function/method names.
4224
4234
4225 2002-10-15 Fernando Perez <fperez@colorado.edu>
4235 2002-10-15 Fernando Perez <fperez@colorado.edu>
4226
4236
4227 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
4237 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
4228 OSX information to main manual, removed README_Mac_OSX file from
4238 OSX information to main manual, removed README_Mac_OSX file from
4229 distribution. Also updated credits for recent additions.
4239 distribution. Also updated credits for recent additions.
4230
4240
4231 2002-10-10 Fernando Perez <fperez@colorado.edu>
4241 2002-10-10 Fernando Perez <fperez@colorado.edu>
4232
4242
4233 * README_Mac_OSX: Added a README for Mac OSX users for fixing
4243 * README_Mac_OSX: Added a README for Mac OSX users for fixing
4234 terminal-related issues. Many thanks to Andrea Riciputi
4244 terminal-related issues. Many thanks to Andrea Riciputi
4235 <andrea.riciputi-AT-libero.it> for writing it.
4245 <andrea.riciputi-AT-libero.it> for writing it.
4236
4246
4237 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
4247 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
4238 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4248 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4239
4249
4240 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
4250 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
4241 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
4251 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
4242 <syver-en-AT-online.no> who both submitted patches for this problem.
4252 <syver-en-AT-online.no> who both submitted patches for this problem.
4243
4253
4244 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
4254 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
4245 global embedding to make sure that things don't overwrite user
4255 global embedding to make sure that things don't overwrite user
4246 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
4256 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
4247
4257
4248 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
4258 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
4249 compatibility. Thanks to Hayden Callow
4259 compatibility. Thanks to Hayden Callow
4250 <h.callow-AT-elec.canterbury.ac.nz>
4260 <h.callow-AT-elec.canterbury.ac.nz>
4251
4261
4252 2002-10-04 Fernando Perez <fperez@colorado.edu>
4262 2002-10-04 Fernando Perez <fperez@colorado.edu>
4253
4263
4254 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
4264 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
4255 Gnuplot.File objects.
4265 Gnuplot.File objects.
4256
4266
4257 2002-07-23 Fernando Perez <fperez@colorado.edu>
4267 2002-07-23 Fernando Perez <fperez@colorado.edu>
4258
4268
4259 * IPython/genutils.py (timing): Added timings() and timing() for
4269 * IPython/genutils.py (timing): Added timings() and timing() for
4260 quick access to the most commonly needed data, the execution
4270 quick access to the most commonly needed data, the execution
4261 times. Old timing() renamed to timings_out().
4271 times. Old timing() renamed to timings_out().
4262
4272
4263 2002-07-18 Fernando Perez <fperez@colorado.edu>
4273 2002-07-18 Fernando Perez <fperez@colorado.edu>
4264
4274
4265 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
4275 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
4266 bug with nested instances disrupting the parent's tab completion.
4276 bug with nested instances disrupting the parent's tab completion.
4267
4277
4268 * IPython/iplib.py (all_completions): Added Alex Schmolck's
4278 * IPython/iplib.py (all_completions): Added Alex Schmolck's
4269 all_completions code to begin the emacs integration.
4279 all_completions code to begin the emacs integration.
4270
4280
4271 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
4281 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
4272 argument to allow titling individual arrays when plotting.
4282 argument to allow titling individual arrays when plotting.
4273
4283
4274 2002-07-15 Fernando Perez <fperez@colorado.edu>
4284 2002-07-15 Fernando Perez <fperez@colorado.edu>
4275
4285
4276 * setup.py (make_shortcut): changed to retrieve the value of
4286 * setup.py (make_shortcut): changed to retrieve the value of
4277 'Program Files' directory from the registry (this value changes in
4287 'Program Files' directory from the registry (this value changes in
4278 non-english versions of Windows). Thanks to Thomas Fanslau
4288 non-english versions of Windows). Thanks to Thomas Fanslau
4279 <tfanslau-AT-gmx.de> for the report.
4289 <tfanslau-AT-gmx.de> for the report.
4280
4290
4281 2002-07-10 Fernando Perez <fperez@colorado.edu>
4291 2002-07-10 Fernando Perez <fperez@colorado.edu>
4282
4292
4283 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
4293 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
4284 a bug in pdb, which crashes if a line with only whitespace is
4294 a bug in pdb, which crashes if a line with only whitespace is
4285 entered. Bug report submitted to sourceforge.
4295 entered. Bug report submitted to sourceforge.
4286
4296
4287 2002-07-09 Fernando Perez <fperez@colorado.edu>
4297 2002-07-09 Fernando Perez <fperez@colorado.edu>
4288
4298
4289 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
4299 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
4290 reporting exceptions (it's a bug in inspect.py, I just set a
4300 reporting exceptions (it's a bug in inspect.py, I just set a
4291 workaround).
4301 workaround).
4292
4302
4293 2002-07-08 Fernando Perez <fperez@colorado.edu>
4303 2002-07-08 Fernando Perez <fperez@colorado.edu>
4294
4304
4295 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
4305 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
4296 __IPYTHON__ in __builtins__ to show up in user_ns.
4306 __IPYTHON__ in __builtins__ to show up in user_ns.
4297
4307
4298 2002-07-03 Fernando Perez <fperez@colorado.edu>
4308 2002-07-03 Fernando Perez <fperez@colorado.edu>
4299
4309
4300 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
4310 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
4301 name from @gp_set_instance to @gp_set_default.
4311 name from @gp_set_instance to @gp_set_default.
4302
4312
4303 * IPython/ipmaker.py (make_IPython): default editor value set to
4313 * IPython/ipmaker.py (make_IPython): default editor value set to
4304 '0' (a string), to match the rc file. Otherwise will crash when
4314 '0' (a string), to match the rc file. Otherwise will crash when
4305 .strip() is called on it.
4315 .strip() is called on it.
4306
4316
4307
4317
4308 2002-06-28 Fernando Perez <fperez@colorado.edu>
4318 2002-06-28 Fernando Perez <fperez@colorado.edu>
4309
4319
4310 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
4320 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
4311 of files in current directory when a file is executed via
4321 of files in current directory when a file is executed via
4312 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
4322 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
4313
4323
4314 * setup.py (manfiles): fix for rpm builds, submitted by RA
4324 * setup.py (manfiles): fix for rpm builds, submitted by RA
4315 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
4325 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
4316
4326
4317 * IPython/ipmaker.py (make_IPython): fixed lookup of default
4327 * IPython/ipmaker.py (make_IPython): fixed lookup of default
4318 editor when set to '0'. Problem was, '0' evaluates to True (it's a
4328 editor when set to '0'. Problem was, '0' evaluates to True (it's a
4319 string!). A. Schmolck caught this one.
4329 string!). A. Schmolck caught this one.
4320
4330
4321 2002-06-27 Fernando Perez <fperez@colorado.edu>
4331 2002-06-27 Fernando Perez <fperez@colorado.edu>
4322
4332
4323 * IPython/ipmaker.py (make_IPython): fixed bug when running user
4333 * IPython/ipmaker.py (make_IPython): fixed bug when running user
4324 defined files at the cmd line. __name__ wasn't being set to
4334 defined files at the cmd line. __name__ wasn't being set to
4325 __main__.
4335 __main__.
4326
4336
4327 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
4337 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
4328 regular lists and tuples besides Numeric arrays.
4338 regular lists and tuples besides Numeric arrays.
4329
4339
4330 * IPython/Prompts.py (CachedOutput.__call__): Added output
4340 * IPython/Prompts.py (CachedOutput.__call__): Added output
4331 supression for input ending with ';'. Similar to Mathematica and
4341 supression for input ending with ';'. Similar to Mathematica and
4332 Matlab. The _* vars and Out[] list are still updated, just like
4342 Matlab. The _* vars and Out[] list are still updated, just like
4333 Mathematica behaves.
4343 Mathematica behaves.
4334
4344
4335 2002-06-25 Fernando Perez <fperez@colorado.edu>
4345 2002-06-25 Fernando Perez <fperez@colorado.edu>
4336
4346
4337 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
4347 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
4338 .ini extensions for profiels under Windows.
4348 .ini extensions for profiels under Windows.
4339
4349
4340 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
4350 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
4341 string form. Fix contributed by Alexander Schmolck
4351 string form. Fix contributed by Alexander Schmolck
4342 <a.schmolck-AT-gmx.net>
4352 <a.schmolck-AT-gmx.net>
4343
4353
4344 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
4354 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
4345 pre-configured Gnuplot instance.
4355 pre-configured Gnuplot instance.
4346
4356
4347 2002-06-21 Fernando Perez <fperez@colorado.edu>
4357 2002-06-21 Fernando Perez <fperez@colorado.edu>
4348
4358
4349 * IPython/numutils.py (exp_safe): new function, works around the
4359 * IPython/numutils.py (exp_safe): new function, works around the
4350 underflow problems in Numeric.
4360 underflow problems in Numeric.
4351 (log2): New fn. Safe log in base 2: returns exact integer answer
4361 (log2): New fn. Safe log in base 2: returns exact integer answer
4352 for exact integer powers of 2.
4362 for exact integer powers of 2.
4353
4363
4354 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
4364 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
4355 properly.
4365 properly.
4356
4366
4357 2002-06-20 Fernando Perez <fperez@colorado.edu>
4367 2002-06-20 Fernando Perez <fperez@colorado.edu>
4358
4368
4359 * IPython/genutils.py (timing): new function like
4369 * IPython/genutils.py (timing): new function like
4360 Mathematica's. Similar to time_test, but returns more info.
4370 Mathematica's. Similar to time_test, but returns more info.
4361
4371
4362 2002-06-18 Fernando Perez <fperez@colorado.edu>
4372 2002-06-18 Fernando Perez <fperez@colorado.edu>
4363
4373
4364 * IPython/Magic.py (Magic.magic_save): modified @save and @r
4374 * IPython/Magic.py (Magic.magic_save): modified @save and @r
4365 according to Mike Heeter's suggestions.
4375 according to Mike Heeter's suggestions.
4366
4376
4367 2002-06-16 Fernando Perez <fperez@colorado.edu>
4377 2002-06-16 Fernando Perez <fperez@colorado.edu>
4368
4378
4369 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
4379 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
4370 system. GnuplotMagic is gone as a user-directory option. New files
4380 system. GnuplotMagic is gone as a user-directory option. New files
4371 make it easier to use all the gnuplot stuff both from external
4381 make it easier to use all the gnuplot stuff both from external
4372 programs as well as from IPython. Had to rewrite part of
4382 programs as well as from IPython. Had to rewrite part of
4373 hardcopy() b/c of a strange bug: often the ps files simply don't
4383 hardcopy() b/c of a strange bug: often the ps files simply don't
4374 get created, and require a repeat of the command (often several
4384 get created, and require a repeat of the command (often several
4375 times).
4385 times).
4376
4386
4377 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
4387 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
4378 resolve output channel at call time, so that if sys.stderr has
4388 resolve output channel at call time, so that if sys.stderr has
4379 been redirected by user this gets honored.
4389 been redirected by user this gets honored.
4380
4390
4381 2002-06-13 Fernando Perez <fperez@colorado.edu>
4391 2002-06-13 Fernando Perez <fperez@colorado.edu>
4382
4392
4383 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
4393 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
4384 IPShell. Kept a copy with the old names to avoid breaking people's
4394 IPShell. Kept a copy with the old names to avoid breaking people's
4385 embedded code.
4395 embedded code.
4386
4396
4387 * IPython/ipython: simplified it to the bare minimum after
4397 * IPython/ipython: simplified it to the bare minimum after
4388 Holger's suggestions. Added info about how to use it in
4398 Holger's suggestions. Added info about how to use it in
4389 PYTHONSTARTUP.
4399 PYTHONSTARTUP.
4390
4400
4391 * IPython/Shell.py (IPythonShell): changed the options passing
4401 * IPython/Shell.py (IPythonShell): changed the options passing
4392 from a string with funky %s replacements to a straight list. Maybe
4402 from a string with funky %s replacements to a straight list. Maybe
4393 a bit more typing, but it follows sys.argv conventions, so there's
4403 a bit more typing, but it follows sys.argv conventions, so there's
4394 less special-casing to remember.
4404 less special-casing to remember.
4395
4405
4396 2002-06-12 Fernando Perez <fperez@colorado.edu>
4406 2002-06-12 Fernando Perez <fperez@colorado.edu>
4397
4407
4398 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
4408 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
4399 command. Thanks to a suggestion by Mike Heeter.
4409 command. Thanks to a suggestion by Mike Heeter.
4400 (Magic.magic_pfile): added behavior to look at filenames if given
4410 (Magic.magic_pfile): added behavior to look at filenames if given
4401 arg is not a defined object.
4411 arg is not a defined object.
4402 (Magic.magic_save): New @save function to save code snippets. Also
4412 (Magic.magic_save): New @save function to save code snippets. Also
4403 a Mike Heeter idea.
4413 a Mike Heeter idea.
4404
4414
4405 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
4415 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
4406 plot() and replot(). Much more convenient now, especially for
4416 plot() and replot(). Much more convenient now, especially for
4407 interactive use.
4417 interactive use.
4408
4418
4409 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
4419 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
4410 filenames.
4420 filenames.
4411
4421
4412 2002-06-02 Fernando Perez <fperez@colorado.edu>
4422 2002-06-02 Fernando Perez <fperez@colorado.edu>
4413
4423
4414 * IPython/Struct.py (Struct.__init__): modified to admit
4424 * IPython/Struct.py (Struct.__init__): modified to admit
4415 initialization via another struct.
4425 initialization via another struct.
4416
4426
4417 * IPython/genutils.py (SystemExec.__init__): New stateful
4427 * IPython/genutils.py (SystemExec.__init__): New stateful
4418 interface to xsys and bq. Useful for writing system scripts.
4428 interface to xsys and bq. Useful for writing system scripts.
4419
4429
4420 2002-05-30 Fernando Perez <fperez@colorado.edu>
4430 2002-05-30 Fernando Perez <fperez@colorado.edu>
4421
4431
4422 * MANIFEST.in: Changed docfile selection to exclude all the lyx
4432 * MANIFEST.in: Changed docfile selection to exclude all the lyx
4423 documents. This will make the user download smaller (it's getting
4433 documents. This will make the user download smaller (it's getting
4424 too big).
4434 too big).
4425
4435
4426 2002-05-29 Fernando Perez <fperez@colorado.edu>
4436 2002-05-29 Fernando Perez <fperez@colorado.edu>
4427
4437
4428 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
4438 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
4429 fix problems with shelve and pickle. Seems to work, but I don't
4439 fix problems with shelve and pickle. Seems to work, but I don't
4430 know if corner cases break it. Thanks to Mike Heeter
4440 know if corner cases break it. Thanks to Mike Heeter
4431 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
4441 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
4432
4442
4433 2002-05-24 Fernando Perez <fperez@colorado.edu>
4443 2002-05-24 Fernando Perez <fperez@colorado.edu>
4434
4444
4435 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
4445 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
4436 macros having broken.
4446 macros having broken.
4437
4447
4438 2002-05-21 Fernando Perez <fperez@colorado.edu>
4448 2002-05-21 Fernando Perez <fperez@colorado.edu>
4439
4449
4440 * IPython/Magic.py (Magic.magic_logstart): fixed recently
4450 * IPython/Magic.py (Magic.magic_logstart): fixed recently
4441 introduced logging bug: all history before logging started was
4451 introduced logging bug: all history before logging started was
4442 being written one character per line! This came from the redesign
4452 being written one character per line! This came from the redesign
4443 of the input history as a special list which slices to strings,
4453 of the input history as a special list which slices to strings,
4444 not to lists.
4454 not to lists.
4445
4455
4446 2002-05-20 Fernando Perez <fperez@colorado.edu>
4456 2002-05-20 Fernando Perez <fperez@colorado.edu>
4447
4457
4448 * IPython/Prompts.py (CachedOutput.__init__): made the color table
4458 * IPython/Prompts.py (CachedOutput.__init__): made the color table
4449 be an attribute of all classes in this module. The design of these
4459 be an attribute of all classes in this module. The design of these
4450 classes needs some serious overhauling.
4460 classes needs some serious overhauling.
4451
4461
4452 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
4462 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
4453 which was ignoring '_' in option names.
4463 which was ignoring '_' in option names.
4454
4464
4455 * IPython/ultraTB.py (FormattedTB.__init__): Changed
4465 * IPython/ultraTB.py (FormattedTB.__init__): Changed
4456 'Verbose_novars' to 'Context' and made it the new default. It's a
4466 'Verbose_novars' to 'Context' and made it the new default. It's a
4457 bit more readable and also safer than verbose.
4467 bit more readable and also safer than verbose.
4458
4468
4459 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
4469 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
4460 triple-quoted strings.
4470 triple-quoted strings.
4461
4471
4462 * IPython/OInspect.py (__all__): new module exposing the object
4472 * IPython/OInspect.py (__all__): new module exposing the object
4463 introspection facilities. Now the corresponding magics are dummy
4473 introspection facilities. Now the corresponding magics are dummy
4464 wrappers around this. Having this module will make it much easier
4474 wrappers around this. Having this module will make it much easier
4465 to put these functions into our modified pdb.
4475 to put these functions into our modified pdb.
4466 This new object inspector system uses the new colorizing module,
4476 This new object inspector system uses the new colorizing module,
4467 so source code and other things are nicely syntax highlighted.
4477 so source code and other things are nicely syntax highlighted.
4468
4478
4469 2002-05-18 Fernando Perez <fperez@colorado.edu>
4479 2002-05-18 Fernando Perez <fperez@colorado.edu>
4470
4480
4471 * IPython/ColorANSI.py: Split the coloring tools into a separate
4481 * IPython/ColorANSI.py: Split the coloring tools into a separate
4472 module so I can use them in other code easier (they were part of
4482 module so I can use them in other code easier (they were part of
4473 ultraTB).
4483 ultraTB).
4474
4484
4475 2002-05-17 Fernando Perez <fperez@colorado.edu>
4485 2002-05-17 Fernando Perez <fperez@colorado.edu>
4476
4486
4477 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4487 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4478 fixed it to set the global 'g' also to the called instance, as
4488 fixed it to set the global 'g' also to the called instance, as
4479 long as 'g' was still a gnuplot instance (so it doesn't overwrite
4489 long as 'g' was still a gnuplot instance (so it doesn't overwrite
4480 user's 'g' variables).
4490 user's 'g' variables).
4481
4491
4482 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
4492 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
4483 global variables (aliases to _ih,_oh) so that users which expect
4493 global variables (aliases to _ih,_oh) so that users which expect
4484 In[5] or Out[7] to work aren't unpleasantly surprised.
4494 In[5] or Out[7] to work aren't unpleasantly surprised.
4485 (InputList.__getslice__): new class to allow executing slices of
4495 (InputList.__getslice__): new class to allow executing slices of
4486 input history directly. Very simple class, complements the use of
4496 input history directly. Very simple class, complements the use of
4487 macros.
4497 macros.
4488
4498
4489 2002-05-16 Fernando Perez <fperez@colorado.edu>
4499 2002-05-16 Fernando Perez <fperez@colorado.edu>
4490
4500
4491 * setup.py (docdirbase): make doc directory be just doc/IPython
4501 * setup.py (docdirbase): make doc directory be just doc/IPython
4492 without version numbers, it will reduce clutter for users.
4502 without version numbers, it will reduce clutter for users.
4493
4503
4494 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4504 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4495 execfile call to prevent possible memory leak. See for details:
4505 execfile call to prevent possible memory leak. See for details:
4496 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4506 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4497
4507
4498 2002-05-15 Fernando Perez <fperez@colorado.edu>
4508 2002-05-15 Fernando Perez <fperez@colorado.edu>
4499
4509
4500 * IPython/Magic.py (Magic.magic_psource): made the object
4510 * IPython/Magic.py (Magic.magic_psource): made the object
4501 introspection names be more standard: pdoc, pdef, pfile and
4511 introspection names be more standard: pdoc, pdef, pfile and
4502 psource. They all print/page their output, and it makes
4512 psource. They all print/page their output, and it makes
4503 remembering them easier. Kept old names for compatibility as
4513 remembering them easier. Kept old names for compatibility as
4504 aliases.
4514 aliases.
4505
4515
4506 2002-05-14 Fernando Perez <fperez@colorado.edu>
4516 2002-05-14 Fernando Perez <fperez@colorado.edu>
4507
4517
4508 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4518 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4509 what the mouse problem was. The trick is to use gnuplot with temp
4519 what the mouse problem was. The trick is to use gnuplot with temp
4510 files and NOT with pipes (for data communication), because having
4520 files and NOT with pipes (for data communication), because having
4511 both pipes and the mouse on is bad news.
4521 both pipes and the mouse on is bad news.
4512
4522
4513 2002-05-13 Fernando Perez <fperez@colorado.edu>
4523 2002-05-13 Fernando Perez <fperez@colorado.edu>
4514
4524
4515 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4525 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4516 bug. Information would be reported about builtins even when
4526 bug. Information would be reported about builtins even when
4517 user-defined functions overrode them.
4527 user-defined functions overrode them.
4518
4528
4519 2002-05-11 Fernando Perez <fperez@colorado.edu>
4529 2002-05-11 Fernando Perez <fperez@colorado.edu>
4520
4530
4521 * IPython/__init__.py (__all__): removed FlexCompleter from
4531 * IPython/__init__.py (__all__): removed FlexCompleter from
4522 __all__ so that things don't fail in platforms without readline.
4532 __all__ so that things don't fail in platforms without readline.
4523
4533
4524 2002-05-10 Fernando Perez <fperez@colorado.edu>
4534 2002-05-10 Fernando Perez <fperez@colorado.edu>
4525
4535
4526 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4536 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4527 it requires Numeric, effectively making Numeric a dependency for
4537 it requires Numeric, effectively making Numeric a dependency for
4528 IPython.
4538 IPython.
4529
4539
4530 * Released 0.2.13
4540 * Released 0.2.13
4531
4541
4532 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4542 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4533 profiler interface. Now all the major options from the profiler
4543 profiler interface. Now all the major options from the profiler
4534 module are directly supported in IPython, both for single
4544 module are directly supported in IPython, both for single
4535 expressions (@prun) and for full programs (@run -p).
4545 expressions (@prun) and for full programs (@run -p).
4536
4546
4537 2002-05-09 Fernando Perez <fperez@colorado.edu>
4547 2002-05-09 Fernando Perez <fperez@colorado.edu>
4538
4548
4539 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4549 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4540 magic properly formatted for screen.
4550 magic properly formatted for screen.
4541
4551
4542 * setup.py (make_shortcut): Changed things to put pdf version in
4552 * setup.py (make_shortcut): Changed things to put pdf version in
4543 doc/ instead of doc/manual (had to change lyxport a bit).
4553 doc/ instead of doc/manual (had to change lyxport a bit).
4544
4554
4545 * IPython/Magic.py (Profile.string_stats): made profile runs go
4555 * IPython/Magic.py (Profile.string_stats): made profile runs go
4546 through pager (they are long and a pager allows searching, saving,
4556 through pager (they are long and a pager allows searching, saving,
4547 etc.)
4557 etc.)
4548
4558
4549 2002-05-08 Fernando Perez <fperez@colorado.edu>
4559 2002-05-08 Fernando Perez <fperez@colorado.edu>
4550
4560
4551 * Released 0.2.12
4561 * Released 0.2.12
4552
4562
4553 2002-05-06 Fernando Perez <fperez@colorado.edu>
4563 2002-05-06 Fernando Perez <fperez@colorado.edu>
4554
4564
4555 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4565 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4556 introduced); 'hist n1 n2' was broken.
4566 introduced); 'hist n1 n2' was broken.
4557 (Magic.magic_pdb): added optional on/off arguments to @pdb
4567 (Magic.magic_pdb): added optional on/off arguments to @pdb
4558 (Magic.magic_run): added option -i to @run, which executes code in
4568 (Magic.magic_run): added option -i to @run, which executes code in
4559 the IPython namespace instead of a clean one. Also added @irun as
4569 the IPython namespace instead of a clean one. Also added @irun as
4560 an alias to @run -i.
4570 an alias to @run -i.
4561
4571
4562 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4572 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4563 fixed (it didn't really do anything, the namespaces were wrong).
4573 fixed (it didn't really do anything, the namespaces were wrong).
4564
4574
4565 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4575 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4566
4576
4567 * IPython/__init__.py (__all__): Fixed package namespace, now
4577 * IPython/__init__.py (__all__): Fixed package namespace, now
4568 'import IPython' does give access to IPython.<all> as
4578 'import IPython' does give access to IPython.<all> as
4569 expected. Also renamed __release__ to Release.
4579 expected. Also renamed __release__ to Release.
4570
4580
4571 * IPython/Debugger.py (__license__): created new Pdb class which
4581 * IPython/Debugger.py (__license__): created new Pdb class which
4572 functions like a drop-in for the normal pdb.Pdb but does NOT
4582 functions like a drop-in for the normal pdb.Pdb but does NOT
4573 import readline by default. This way it doesn't muck up IPython's
4583 import readline by default. This way it doesn't muck up IPython's
4574 readline handling, and now tab-completion finally works in the
4584 readline handling, and now tab-completion finally works in the
4575 debugger -- sort of. It completes things globally visible, but the
4585 debugger -- sort of. It completes things globally visible, but the
4576 completer doesn't track the stack as pdb walks it. That's a bit
4586 completer doesn't track the stack as pdb walks it. That's a bit
4577 tricky, and I'll have to implement it later.
4587 tricky, and I'll have to implement it later.
4578
4588
4579 2002-05-05 Fernando Perez <fperez@colorado.edu>
4589 2002-05-05 Fernando Perez <fperez@colorado.edu>
4580
4590
4581 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4591 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4582 magic docstrings when printed via ? (explicit \'s were being
4592 magic docstrings when printed via ? (explicit \'s were being
4583 printed).
4593 printed).
4584
4594
4585 * IPython/ipmaker.py (make_IPython): fixed namespace
4595 * IPython/ipmaker.py (make_IPython): fixed namespace
4586 identification bug. Now variables loaded via logs or command-line
4596 identification bug. Now variables loaded via logs or command-line
4587 files are recognized in the interactive namespace by @who.
4597 files are recognized in the interactive namespace by @who.
4588
4598
4589 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4599 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4590 log replay system stemming from the string form of Structs.
4600 log replay system stemming from the string form of Structs.
4591
4601
4592 * IPython/Magic.py (Macro.__init__): improved macros to properly
4602 * IPython/Magic.py (Macro.__init__): improved macros to properly
4593 handle magic commands in them.
4603 handle magic commands in them.
4594 (Magic.magic_logstart): usernames are now expanded so 'logstart
4604 (Magic.magic_logstart): usernames are now expanded so 'logstart
4595 ~/mylog' now works.
4605 ~/mylog' now works.
4596
4606
4597 * IPython/iplib.py (complete): fixed bug where paths starting with
4607 * IPython/iplib.py (complete): fixed bug where paths starting with
4598 '/' would be completed as magic names.
4608 '/' would be completed as magic names.
4599
4609
4600 2002-05-04 Fernando Perez <fperez@colorado.edu>
4610 2002-05-04 Fernando Perez <fperez@colorado.edu>
4601
4611
4602 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4612 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4603 allow running full programs under the profiler's control.
4613 allow running full programs under the profiler's control.
4604
4614
4605 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4615 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4606 mode to report exceptions verbosely but without formatting
4616 mode to report exceptions verbosely but without formatting
4607 variables. This addresses the issue of ipython 'freezing' (it's
4617 variables. This addresses the issue of ipython 'freezing' (it's
4608 not frozen, but caught in an expensive formatting loop) when huge
4618 not frozen, but caught in an expensive formatting loop) when huge
4609 variables are in the context of an exception.
4619 variables are in the context of an exception.
4610 (VerboseTB.text): Added '--->' markers at line where exception was
4620 (VerboseTB.text): Added '--->' markers at line where exception was
4611 triggered. Much clearer to read, especially in NoColor modes.
4621 triggered. Much clearer to read, especially in NoColor modes.
4612
4622
4613 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4623 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4614 implemented in reverse when changing to the new parse_options().
4624 implemented in reverse when changing to the new parse_options().
4615
4625
4616 2002-05-03 Fernando Perez <fperez@colorado.edu>
4626 2002-05-03 Fernando Perez <fperez@colorado.edu>
4617
4627
4618 * IPython/Magic.py (Magic.parse_options): new function so that
4628 * IPython/Magic.py (Magic.parse_options): new function so that
4619 magics can parse options easier.
4629 magics can parse options easier.
4620 (Magic.magic_prun): new function similar to profile.run(),
4630 (Magic.magic_prun): new function similar to profile.run(),
4621 suggested by Chris Hart.
4631 suggested by Chris Hart.
4622 (Magic.magic_cd): fixed behavior so that it only changes if
4632 (Magic.magic_cd): fixed behavior so that it only changes if
4623 directory actually is in history.
4633 directory actually is in history.
4624
4634
4625 * IPython/usage.py (__doc__): added information about potential
4635 * IPython/usage.py (__doc__): added information about potential
4626 slowness of Verbose exception mode when there are huge data
4636 slowness of Verbose exception mode when there are huge data
4627 structures to be formatted (thanks to Archie Paulson).
4637 structures to be formatted (thanks to Archie Paulson).
4628
4638
4629 * IPython/ipmaker.py (make_IPython): Changed default logging
4639 * IPython/ipmaker.py (make_IPython): Changed default logging
4630 (when simply called with -log) to use curr_dir/ipython.log in
4640 (when simply called with -log) to use curr_dir/ipython.log in
4631 rotate mode. Fixed crash which was occuring with -log before
4641 rotate mode. Fixed crash which was occuring with -log before
4632 (thanks to Jim Boyle).
4642 (thanks to Jim Boyle).
4633
4643
4634 2002-05-01 Fernando Perez <fperez@colorado.edu>
4644 2002-05-01 Fernando Perez <fperez@colorado.edu>
4635
4645
4636 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4646 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4637 was nasty -- though somewhat of a corner case).
4647 was nasty -- though somewhat of a corner case).
4638
4648
4639 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4649 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4640 text (was a bug).
4650 text (was a bug).
4641
4651
4642 2002-04-30 Fernando Perez <fperez@colorado.edu>
4652 2002-04-30 Fernando Perez <fperez@colorado.edu>
4643
4653
4644 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4654 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4645 a print after ^D or ^C from the user so that the In[] prompt
4655 a print after ^D or ^C from the user so that the In[] prompt
4646 doesn't over-run the gnuplot one.
4656 doesn't over-run the gnuplot one.
4647
4657
4648 2002-04-29 Fernando Perez <fperez@colorado.edu>
4658 2002-04-29 Fernando Perez <fperez@colorado.edu>
4649
4659
4650 * Released 0.2.10
4660 * Released 0.2.10
4651
4661
4652 * IPython/__release__.py (version): get date dynamically.
4662 * IPython/__release__.py (version): get date dynamically.
4653
4663
4654 * Misc. documentation updates thanks to Arnd's comments. Also ran
4664 * Misc. documentation updates thanks to Arnd's comments. Also ran
4655 a full spellcheck on the manual (hadn't been done in a while).
4665 a full spellcheck on the manual (hadn't been done in a while).
4656
4666
4657 2002-04-27 Fernando Perez <fperez@colorado.edu>
4667 2002-04-27 Fernando Perez <fperez@colorado.edu>
4658
4668
4659 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4669 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4660 starting a log in mid-session would reset the input history list.
4670 starting a log in mid-session would reset the input history list.
4661
4671
4662 2002-04-26 Fernando Perez <fperez@colorado.edu>
4672 2002-04-26 Fernando Perez <fperez@colorado.edu>
4663
4673
4664 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4674 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4665 all files were being included in an update. Now anything in
4675 all files were being included in an update. Now anything in
4666 UserConfig that matches [A-Za-z]*.py will go (this excludes
4676 UserConfig that matches [A-Za-z]*.py will go (this excludes
4667 __init__.py)
4677 __init__.py)
4668
4678
4669 2002-04-25 Fernando Perez <fperez@colorado.edu>
4679 2002-04-25 Fernando Perez <fperez@colorado.edu>
4670
4680
4671 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4681 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4672 to __builtins__ so that any form of embedded or imported code can
4682 to __builtins__ so that any form of embedded or imported code can
4673 test for being inside IPython.
4683 test for being inside IPython.
4674
4684
4675 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4685 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4676 changed to GnuplotMagic because it's now an importable module,
4686 changed to GnuplotMagic because it's now an importable module,
4677 this makes the name follow that of the standard Gnuplot module.
4687 this makes the name follow that of the standard Gnuplot module.
4678 GnuplotMagic can now be loaded at any time in mid-session.
4688 GnuplotMagic can now be loaded at any time in mid-session.
4679
4689
4680 2002-04-24 Fernando Perez <fperez@colorado.edu>
4690 2002-04-24 Fernando Perez <fperez@colorado.edu>
4681
4691
4682 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4692 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4683 the globals (IPython has its own namespace) and the
4693 the globals (IPython has its own namespace) and the
4684 PhysicalQuantity stuff is much better anyway.
4694 PhysicalQuantity stuff is much better anyway.
4685
4695
4686 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4696 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4687 embedding example to standard user directory for
4697 embedding example to standard user directory for
4688 distribution. Also put it in the manual.
4698 distribution. Also put it in the manual.
4689
4699
4690 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4700 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4691 instance as first argument (so it doesn't rely on some obscure
4701 instance as first argument (so it doesn't rely on some obscure
4692 hidden global).
4702 hidden global).
4693
4703
4694 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4704 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4695 delimiters. While it prevents ().TAB from working, it allows
4705 delimiters. While it prevents ().TAB from working, it allows
4696 completions in open (... expressions. This is by far a more common
4706 completions in open (... expressions. This is by far a more common
4697 case.
4707 case.
4698
4708
4699 2002-04-23 Fernando Perez <fperez@colorado.edu>
4709 2002-04-23 Fernando Perez <fperez@colorado.edu>
4700
4710
4701 * IPython/Extensions/InterpreterPasteInput.py: new
4711 * IPython/Extensions/InterpreterPasteInput.py: new
4702 syntax-processing module for pasting lines with >>> or ... at the
4712 syntax-processing module for pasting lines with >>> or ... at the
4703 start.
4713 start.
4704
4714
4705 * IPython/Extensions/PhysicalQ_Interactive.py
4715 * IPython/Extensions/PhysicalQ_Interactive.py
4706 (PhysicalQuantityInteractive.__int__): fixed to work with either
4716 (PhysicalQuantityInteractive.__int__): fixed to work with either
4707 Numeric or math.
4717 Numeric or math.
4708
4718
4709 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4719 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4710 provided profiles. Now we have:
4720 provided profiles. Now we have:
4711 -math -> math module as * and cmath with its own namespace.
4721 -math -> math module as * and cmath with its own namespace.
4712 -numeric -> Numeric as *, plus gnuplot & grace
4722 -numeric -> Numeric as *, plus gnuplot & grace
4713 -physics -> same as before
4723 -physics -> same as before
4714
4724
4715 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4725 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4716 user-defined magics wouldn't be found by @magic if they were
4726 user-defined magics wouldn't be found by @magic if they were
4717 defined as class methods. Also cleaned up the namespace search
4727 defined as class methods. Also cleaned up the namespace search
4718 logic and the string building (to use %s instead of many repeated
4728 logic and the string building (to use %s instead of many repeated
4719 string adds).
4729 string adds).
4720
4730
4721 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4731 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4722 of user-defined magics to operate with class methods (cleaner, in
4732 of user-defined magics to operate with class methods (cleaner, in
4723 line with the gnuplot code).
4733 line with the gnuplot code).
4724
4734
4725 2002-04-22 Fernando Perez <fperez@colorado.edu>
4735 2002-04-22 Fernando Perez <fperez@colorado.edu>
4726
4736
4727 * setup.py: updated dependency list so that manual is updated when
4737 * setup.py: updated dependency list so that manual is updated when
4728 all included files change.
4738 all included files change.
4729
4739
4730 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4740 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4731 the delimiter removal option (the fix is ugly right now).
4741 the delimiter removal option (the fix is ugly right now).
4732
4742
4733 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4743 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4734 all of the math profile (quicker loading, no conflict between
4744 all of the math profile (quicker loading, no conflict between
4735 g-9.8 and g-gnuplot).
4745 g-9.8 and g-gnuplot).
4736
4746
4737 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4747 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4738 name of post-mortem files to IPython_crash_report.txt.
4748 name of post-mortem files to IPython_crash_report.txt.
4739
4749
4740 * Cleanup/update of the docs. Added all the new readline info and
4750 * Cleanup/update of the docs. Added all the new readline info and
4741 formatted all lists as 'real lists'.
4751 formatted all lists as 'real lists'.
4742
4752
4743 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4753 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4744 tab-completion options, since the full readline parse_and_bind is
4754 tab-completion options, since the full readline parse_and_bind is
4745 now accessible.
4755 now accessible.
4746
4756
4747 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4757 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4748 handling of readline options. Now users can specify any string to
4758 handling of readline options. Now users can specify any string to
4749 be passed to parse_and_bind(), as well as the delimiters to be
4759 be passed to parse_and_bind(), as well as the delimiters to be
4750 removed.
4760 removed.
4751 (InteractiveShell.__init__): Added __name__ to the global
4761 (InteractiveShell.__init__): Added __name__ to the global
4752 namespace so that things like Itpl which rely on its existence
4762 namespace so that things like Itpl which rely on its existence
4753 don't crash.
4763 don't crash.
4754 (InteractiveShell._prefilter): Defined the default with a _ so
4764 (InteractiveShell._prefilter): Defined the default with a _ so
4755 that prefilter() is easier to override, while the default one
4765 that prefilter() is easier to override, while the default one
4756 remains available.
4766 remains available.
4757
4767
4758 2002-04-18 Fernando Perez <fperez@colorado.edu>
4768 2002-04-18 Fernando Perez <fperez@colorado.edu>
4759
4769
4760 * Added information about pdb in the docs.
4770 * Added information about pdb in the docs.
4761
4771
4762 2002-04-17 Fernando Perez <fperez@colorado.edu>
4772 2002-04-17 Fernando Perez <fperez@colorado.edu>
4763
4773
4764 * IPython/ipmaker.py (make_IPython): added rc_override option to
4774 * IPython/ipmaker.py (make_IPython): added rc_override option to
4765 allow passing config options at creation time which may override
4775 allow passing config options at creation time which may override
4766 anything set in the config files or command line. This is
4776 anything set in the config files or command line. This is
4767 particularly useful for configuring embedded instances.
4777 particularly useful for configuring embedded instances.
4768
4778
4769 2002-04-15 Fernando Perez <fperez@colorado.edu>
4779 2002-04-15 Fernando Perez <fperez@colorado.edu>
4770
4780
4771 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4781 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4772 crash embedded instances because of the input cache falling out of
4782 crash embedded instances because of the input cache falling out of
4773 sync with the output counter.
4783 sync with the output counter.
4774
4784
4775 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4785 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4776 mode which calls pdb after an uncaught exception in IPython itself.
4786 mode which calls pdb after an uncaught exception in IPython itself.
4777
4787
4778 2002-04-14 Fernando Perez <fperez@colorado.edu>
4788 2002-04-14 Fernando Perez <fperez@colorado.edu>
4779
4789
4780 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4790 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4781 readline, fix it back after each call.
4791 readline, fix it back after each call.
4782
4792
4783 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4793 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4784 method to force all access via __call__(), which guarantees that
4794 method to force all access via __call__(), which guarantees that
4785 traceback references are properly deleted.
4795 traceback references are properly deleted.
4786
4796
4787 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4797 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4788 improve printing when pprint is in use.
4798 improve printing when pprint is in use.
4789
4799
4790 2002-04-13 Fernando Perez <fperez@colorado.edu>
4800 2002-04-13 Fernando Perez <fperez@colorado.edu>
4791
4801
4792 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4802 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4793 exceptions aren't caught anymore. If the user triggers one, he
4803 exceptions aren't caught anymore. If the user triggers one, he
4794 should know why he's doing it and it should go all the way up,
4804 should know why he's doing it and it should go all the way up,
4795 just like any other exception. So now @abort will fully kill the
4805 just like any other exception. So now @abort will fully kill the
4796 embedded interpreter and the embedding code (unless that happens
4806 embedded interpreter and the embedding code (unless that happens
4797 to catch SystemExit).
4807 to catch SystemExit).
4798
4808
4799 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4809 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4800 and a debugger() method to invoke the interactive pdb debugger
4810 and a debugger() method to invoke the interactive pdb debugger
4801 after printing exception information. Also added the corresponding
4811 after printing exception information. Also added the corresponding
4802 -pdb option and @pdb magic to control this feature, and updated
4812 -pdb option and @pdb magic to control this feature, and updated
4803 the docs. After a suggestion from Christopher Hart
4813 the docs. After a suggestion from Christopher Hart
4804 (hart-AT-caltech.edu).
4814 (hart-AT-caltech.edu).
4805
4815
4806 2002-04-12 Fernando Perez <fperez@colorado.edu>
4816 2002-04-12 Fernando Perez <fperez@colorado.edu>
4807
4817
4808 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4818 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4809 the exception handlers defined by the user (not the CrashHandler)
4819 the exception handlers defined by the user (not the CrashHandler)
4810 so that user exceptions don't trigger an ipython bug report.
4820 so that user exceptions don't trigger an ipython bug report.
4811
4821
4812 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4822 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4813 configurable (it should have always been so).
4823 configurable (it should have always been so).
4814
4824
4815 2002-03-26 Fernando Perez <fperez@colorado.edu>
4825 2002-03-26 Fernando Perez <fperez@colorado.edu>
4816
4826
4817 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4827 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4818 and there to fix embedding namespace issues. This should all be
4828 and there to fix embedding namespace issues. This should all be
4819 done in a more elegant way.
4829 done in a more elegant way.
4820
4830
4821 2002-03-25 Fernando Perez <fperez@colorado.edu>
4831 2002-03-25 Fernando Perez <fperez@colorado.edu>
4822
4832
4823 * IPython/genutils.py (get_home_dir): Try to make it work under
4833 * IPython/genutils.py (get_home_dir): Try to make it work under
4824 win9x also.
4834 win9x also.
4825
4835
4826 2002-03-20 Fernando Perez <fperez@colorado.edu>
4836 2002-03-20 Fernando Perez <fperez@colorado.edu>
4827
4837
4828 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4838 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4829 sys.displayhook untouched upon __init__.
4839 sys.displayhook untouched upon __init__.
4830
4840
4831 2002-03-19 Fernando Perez <fperez@colorado.edu>
4841 2002-03-19 Fernando Perez <fperez@colorado.edu>
4832
4842
4833 * Released 0.2.9 (for embedding bug, basically).
4843 * Released 0.2.9 (for embedding bug, basically).
4834
4844
4835 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4845 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4836 exceptions so that enclosing shell's state can be restored.
4846 exceptions so that enclosing shell's state can be restored.
4837
4847
4838 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4848 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4839 naming conventions in the .ipython/ dir.
4849 naming conventions in the .ipython/ dir.
4840
4850
4841 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4851 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4842 from delimiters list so filenames with - in them get expanded.
4852 from delimiters list so filenames with - in them get expanded.
4843
4853
4844 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4854 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4845 sys.displayhook not being properly restored after an embedded call.
4855 sys.displayhook not being properly restored after an embedded call.
4846
4856
4847 2002-03-18 Fernando Perez <fperez@colorado.edu>
4857 2002-03-18 Fernando Perez <fperez@colorado.edu>
4848
4858
4849 * Released 0.2.8
4859 * Released 0.2.8
4850
4860
4851 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4861 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4852 some files weren't being included in a -upgrade.
4862 some files weren't being included in a -upgrade.
4853 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4863 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4854 on' so that the first tab completes.
4864 on' so that the first tab completes.
4855 (InteractiveShell.handle_magic): fixed bug with spaces around
4865 (InteractiveShell.handle_magic): fixed bug with spaces around
4856 quotes breaking many magic commands.
4866 quotes breaking many magic commands.
4857
4867
4858 * setup.py: added note about ignoring the syntax error messages at
4868 * setup.py: added note about ignoring the syntax error messages at
4859 installation.
4869 installation.
4860
4870
4861 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4871 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4862 streamlining the gnuplot interface, now there's only one magic @gp.
4872 streamlining the gnuplot interface, now there's only one magic @gp.
4863
4873
4864 2002-03-17 Fernando Perez <fperez@colorado.edu>
4874 2002-03-17 Fernando Perez <fperez@colorado.edu>
4865
4875
4866 * IPython/UserConfig/magic_gnuplot.py: new name for the
4876 * IPython/UserConfig/magic_gnuplot.py: new name for the
4867 example-magic_pm.py file. Much enhanced system, now with a shell
4877 example-magic_pm.py file. Much enhanced system, now with a shell
4868 for communicating directly with gnuplot, one command at a time.
4878 for communicating directly with gnuplot, one command at a time.
4869
4879
4870 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4880 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4871 setting __name__=='__main__'.
4881 setting __name__=='__main__'.
4872
4882
4873 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4883 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4874 mini-shell for accessing gnuplot from inside ipython. Should
4884 mini-shell for accessing gnuplot from inside ipython. Should
4875 extend it later for grace access too. Inspired by Arnd's
4885 extend it later for grace access too. Inspired by Arnd's
4876 suggestion.
4886 suggestion.
4877
4887
4878 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4888 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4879 calling magic functions with () in their arguments. Thanks to Arnd
4889 calling magic functions with () in their arguments. Thanks to Arnd
4880 Baecker for pointing this to me.
4890 Baecker for pointing this to me.
4881
4891
4882 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4892 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4883 infinitely for integer or complex arrays (only worked with floats).
4893 infinitely for integer or complex arrays (only worked with floats).
4884
4894
4885 2002-03-16 Fernando Perez <fperez@colorado.edu>
4895 2002-03-16 Fernando Perez <fperez@colorado.edu>
4886
4896
4887 * setup.py: Merged setup and setup_windows into a single script
4897 * setup.py: Merged setup and setup_windows into a single script
4888 which properly handles things for windows users.
4898 which properly handles things for windows users.
4889
4899
4890 2002-03-15 Fernando Perez <fperez@colorado.edu>
4900 2002-03-15 Fernando Perez <fperez@colorado.edu>
4891
4901
4892 * Big change to the manual: now the magics are all automatically
4902 * Big change to the manual: now the magics are all automatically
4893 documented. This information is generated from their docstrings
4903 documented. This information is generated from their docstrings
4894 and put in a latex file included by the manual lyx file. This way
4904 and put in a latex file included by the manual lyx file. This way
4895 we get always up to date information for the magics. The manual
4905 we get always up to date information for the magics. The manual
4896 now also has proper version information, also auto-synced.
4906 now also has proper version information, also auto-synced.
4897
4907
4898 For this to work, an undocumented --magic_docstrings option was added.
4908 For this to work, an undocumented --magic_docstrings option was added.
4899
4909
4900 2002-03-13 Fernando Perez <fperez@colorado.edu>
4910 2002-03-13 Fernando Perez <fperez@colorado.edu>
4901
4911
4902 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4912 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4903 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4913 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4904
4914
4905 2002-03-12 Fernando Perez <fperez@colorado.edu>
4915 2002-03-12 Fernando Perez <fperez@colorado.edu>
4906
4916
4907 * IPython/ultraTB.py (TermColors): changed color escapes again to
4917 * IPython/ultraTB.py (TermColors): changed color escapes again to
4908 fix the (old, reintroduced) line-wrapping bug. Basically, if
4918 fix the (old, reintroduced) line-wrapping bug. Basically, if
4909 \001..\002 aren't given in the color escapes, lines get wrapped
4919 \001..\002 aren't given in the color escapes, lines get wrapped
4910 weirdly. But giving those screws up old xterms and emacs terms. So
4920 weirdly. But giving those screws up old xterms and emacs terms. So
4911 I added some logic for emacs terms to be ok, but I can't identify old
4921 I added some logic for emacs terms to be ok, but I can't identify old
4912 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4922 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4913
4923
4914 2002-03-10 Fernando Perez <fperez@colorado.edu>
4924 2002-03-10 Fernando Perez <fperez@colorado.edu>
4915
4925
4916 * IPython/usage.py (__doc__): Various documentation cleanups and
4926 * IPython/usage.py (__doc__): Various documentation cleanups and
4917 updates, both in usage docstrings and in the manual.
4927 updates, both in usage docstrings and in the manual.
4918
4928
4919 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4929 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4920 handling of caching. Set minimum acceptabe value for having a
4930 handling of caching. Set minimum acceptabe value for having a
4921 cache at 20 values.
4931 cache at 20 values.
4922
4932
4923 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4933 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4924 install_first_time function to a method, renamed it and added an
4934 install_first_time function to a method, renamed it and added an
4925 'upgrade' mode. Now people can update their config directory with
4935 'upgrade' mode. Now people can update their config directory with
4926 a simple command line switch (-upgrade, also new).
4936 a simple command line switch (-upgrade, also new).
4927
4937
4928 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4938 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4929 @file (convenient for automagic users under Python >= 2.2).
4939 @file (convenient for automagic users under Python >= 2.2).
4930 Removed @files (it seemed more like a plural than an abbrev. of
4940 Removed @files (it seemed more like a plural than an abbrev. of
4931 'file show').
4941 'file show').
4932
4942
4933 * IPython/iplib.py (install_first_time): Fixed crash if there were
4943 * IPython/iplib.py (install_first_time): Fixed crash if there were
4934 backup files ('~') in .ipython/ install directory.
4944 backup files ('~') in .ipython/ install directory.
4935
4945
4936 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4946 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4937 system. Things look fine, but these changes are fairly
4947 system. Things look fine, but these changes are fairly
4938 intrusive. Test them for a few days.
4948 intrusive. Test them for a few days.
4939
4949
4940 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4950 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4941 the prompts system. Now all in/out prompt strings are user
4951 the prompts system. Now all in/out prompt strings are user
4942 controllable. This is particularly useful for embedding, as one
4952 controllable. This is particularly useful for embedding, as one
4943 can tag embedded instances with particular prompts.
4953 can tag embedded instances with particular prompts.
4944
4954
4945 Also removed global use of sys.ps1/2, which now allows nested
4955 Also removed global use of sys.ps1/2, which now allows nested
4946 embeddings without any problems. Added command-line options for
4956 embeddings without any problems. Added command-line options for
4947 the prompt strings.
4957 the prompt strings.
4948
4958
4949 2002-03-08 Fernando Perez <fperez@colorado.edu>
4959 2002-03-08 Fernando Perez <fperez@colorado.edu>
4950
4960
4951 * IPython/UserConfig/example-embed-short.py (ipshell): added
4961 * IPython/UserConfig/example-embed-short.py (ipshell): added
4952 example file with the bare minimum code for embedding.
4962 example file with the bare minimum code for embedding.
4953
4963
4954 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4964 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4955 functionality for the embeddable shell to be activated/deactivated
4965 functionality for the embeddable shell to be activated/deactivated
4956 either globally or at each call.
4966 either globally or at each call.
4957
4967
4958 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4968 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4959 rewriting the prompt with '--->' for auto-inputs with proper
4969 rewriting the prompt with '--->' for auto-inputs with proper
4960 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4970 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4961 this is handled by the prompts class itself, as it should.
4971 this is handled by the prompts class itself, as it should.
4962
4972
4963 2002-03-05 Fernando Perez <fperez@colorado.edu>
4973 2002-03-05 Fernando Perez <fperez@colorado.edu>
4964
4974
4965 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4975 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4966 @logstart to avoid name clashes with the math log function.
4976 @logstart to avoid name clashes with the math log function.
4967
4977
4968 * Big updates to X/Emacs section of the manual.
4978 * Big updates to X/Emacs section of the manual.
4969
4979
4970 * Removed ipython_emacs. Milan explained to me how to pass
4980 * Removed ipython_emacs. Milan explained to me how to pass
4971 arguments to ipython through Emacs. Some day I'm going to end up
4981 arguments to ipython through Emacs. Some day I'm going to end up
4972 learning some lisp...
4982 learning some lisp...
4973
4983
4974 2002-03-04 Fernando Perez <fperez@colorado.edu>
4984 2002-03-04 Fernando Perez <fperez@colorado.edu>
4975
4985
4976 * IPython/ipython_emacs: Created script to be used as the
4986 * IPython/ipython_emacs: Created script to be used as the
4977 py-python-command Emacs variable so we can pass IPython
4987 py-python-command Emacs variable so we can pass IPython
4978 parameters. I can't figure out how to tell Emacs directly to pass
4988 parameters. I can't figure out how to tell Emacs directly to pass
4979 parameters to IPython, so a dummy shell script will do it.
4989 parameters to IPython, so a dummy shell script will do it.
4980
4990
4981 Other enhancements made for things to work better under Emacs'
4991 Other enhancements made for things to work better under Emacs'
4982 various types of terminals. Many thanks to Milan Zamazal
4992 various types of terminals. Many thanks to Milan Zamazal
4983 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4993 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4984
4994
4985 2002-03-01 Fernando Perez <fperez@colorado.edu>
4995 2002-03-01 Fernando Perez <fperez@colorado.edu>
4986
4996
4987 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4997 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4988 that loading of readline is now optional. This gives better
4998 that loading of readline is now optional. This gives better
4989 control to emacs users.
4999 control to emacs users.
4990
5000
4991 * IPython/ultraTB.py (__date__): Modified color escape sequences
5001 * IPython/ultraTB.py (__date__): Modified color escape sequences
4992 and now things work fine under xterm and in Emacs' term buffers
5002 and now things work fine under xterm and in Emacs' term buffers
4993 (though not shell ones). Well, in emacs you get colors, but all
5003 (though not shell ones). Well, in emacs you get colors, but all
4994 seem to be 'light' colors (no difference between dark and light
5004 seem to be 'light' colors (no difference between dark and light
4995 ones). But the garbage chars are gone, and also in xterms. It
5005 ones). But the garbage chars are gone, and also in xterms. It
4996 seems that now I'm using 'cleaner' ansi sequences.
5006 seems that now I'm using 'cleaner' ansi sequences.
4997
5007
4998 2002-02-21 Fernando Perez <fperez@colorado.edu>
5008 2002-02-21 Fernando Perez <fperez@colorado.edu>
4999
5009
5000 * Released 0.2.7 (mainly to publish the scoping fix).
5010 * Released 0.2.7 (mainly to publish the scoping fix).
5001
5011
5002 * IPython/Logger.py (Logger.logstate): added. A corresponding
5012 * IPython/Logger.py (Logger.logstate): added. A corresponding
5003 @logstate magic was created.
5013 @logstate magic was created.
5004
5014
5005 * IPython/Magic.py: fixed nested scoping problem under Python
5015 * IPython/Magic.py: fixed nested scoping problem under Python
5006 2.1.x (automagic wasn't working).
5016 2.1.x (automagic wasn't working).
5007
5017
5008 2002-02-20 Fernando Perez <fperez@colorado.edu>
5018 2002-02-20 Fernando Perez <fperez@colorado.edu>
5009
5019
5010 * Released 0.2.6.
5020 * Released 0.2.6.
5011
5021
5012 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
5022 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
5013 option so that logs can come out without any headers at all.
5023 option so that logs can come out without any headers at all.
5014
5024
5015 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
5025 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
5016 SciPy.
5026 SciPy.
5017
5027
5018 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
5028 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
5019 that embedded IPython calls don't require vars() to be explicitly
5029 that embedded IPython calls don't require vars() to be explicitly
5020 passed. Now they are extracted from the caller's frame (code
5030 passed. Now they are extracted from the caller's frame (code
5021 snatched from Eric Jones' weave). Added better documentation to
5031 snatched from Eric Jones' weave). Added better documentation to
5022 the section on embedding and the example file.
5032 the section on embedding and the example file.
5023
5033
5024 * IPython/genutils.py (page): Changed so that under emacs, it just
5034 * IPython/genutils.py (page): Changed so that under emacs, it just
5025 prints the string. You can then page up and down in the emacs
5035 prints the string. You can then page up and down in the emacs
5026 buffer itself. This is how the builtin help() works.
5036 buffer itself. This is how the builtin help() works.
5027
5037
5028 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
5038 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
5029 macro scoping: macros need to be executed in the user's namespace
5039 macro scoping: macros need to be executed in the user's namespace
5030 to work as if they had been typed by the user.
5040 to work as if they had been typed by the user.
5031
5041
5032 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
5042 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
5033 execute automatically (no need to type 'exec...'). They then
5043 execute automatically (no need to type 'exec...'). They then
5034 behave like 'true macros'. The printing system was also modified
5044 behave like 'true macros'. The printing system was also modified
5035 for this to work.
5045 for this to work.
5036
5046
5037 2002-02-19 Fernando Perez <fperez@colorado.edu>
5047 2002-02-19 Fernando Perez <fperez@colorado.edu>
5038
5048
5039 * IPython/genutils.py (page_file): new function for paging files
5049 * IPython/genutils.py (page_file): new function for paging files
5040 in an OS-independent way. Also necessary for file viewing to work
5050 in an OS-independent way. Also necessary for file viewing to work
5041 well inside Emacs buffers.
5051 well inside Emacs buffers.
5042 (page): Added checks for being in an emacs buffer.
5052 (page): Added checks for being in an emacs buffer.
5043 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
5053 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
5044 same bug in iplib.
5054 same bug in iplib.
5045
5055
5046 2002-02-18 Fernando Perez <fperez@colorado.edu>
5056 2002-02-18 Fernando Perez <fperez@colorado.edu>
5047
5057
5048 * IPython/iplib.py (InteractiveShell.init_readline): modified use
5058 * IPython/iplib.py (InteractiveShell.init_readline): modified use
5049 of readline so that IPython can work inside an Emacs buffer.
5059 of readline so that IPython can work inside an Emacs buffer.
5050
5060
5051 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
5061 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
5052 method signatures (they weren't really bugs, but it looks cleaner
5062 method signatures (they weren't really bugs, but it looks cleaner
5053 and keeps PyChecker happy).
5063 and keeps PyChecker happy).
5054
5064
5055 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
5065 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
5056 for implementing various user-defined hooks. Currently only
5066 for implementing various user-defined hooks. Currently only
5057 display is done.
5067 display is done.
5058
5068
5059 * IPython/Prompts.py (CachedOutput._display): changed display
5069 * IPython/Prompts.py (CachedOutput._display): changed display
5060 functions so that they can be dynamically changed by users easily.
5070 functions so that they can be dynamically changed by users easily.
5061
5071
5062 * IPython/Extensions/numeric_formats.py (num_display): added an
5072 * IPython/Extensions/numeric_formats.py (num_display): added an
5063 extension for printing NumPy arrays in flexible manners. It
5073 extension for printing NumPy arrays in flexible manners. It
5064 doesn't do anything yet, but all the structure is in
5074 doesn't do anything yet, but all the structure is in
5065 place. Ultimately the plan is to implement output format control
5075 place. Ultimately the plan is to implement output format control
5066 like in Octave.
5076 like in Octave.
5067
5077
5068 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
5078 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
5069 methods are found at run-time by all the automatic machinery.
5079 methods are found at run-time by all the automatic machinery.
5070
5080
5071 2002-02-17 Fernando Perez <fperez@colorado.edu>
5081 2002-02-17 Fernando Perez <fperez@colorado.edu>
5072
5082
5073 * setup_Windows.py (make_shortcut): documented. Cleaned up the
5083 * setup_Windows.py (make_shortcut): documented. Cleaned up the
5074 whole file a little.
5084 whole file a little.
5075
5085
5076 * ToDo: closed this document. Now there's a new_design.lyx
5086 * ToDo: closed this document. Now there's a new_design.lyx
5077 document for all new ideas. Added making a pdf of it for the
5087 document for all new ideas. Added making a pdf of it for the
5078 end-user distro.
5088 end-user distro.
5079
5089
5080 * IPython/Logger.py (Logger.switch_log): Created this to replace
5090 * IPython/Logger.py (Logger.switch_log): Created this to replace
5081 logon() and logoff(). It also fixes a nasty crash reported by
5091 logon() and logoff(). It also fixes a nasty crash reported by
5082 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
5092 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
5083
5093
5084 * IPython/iplib.py (complete): got auto-completion to work with
5094 * IPython/iplib.py (complete): got auto-completion to work with
5085 automagic (I had wanted this for a long time).
5095 automagic (I had wanted this for a long time).
5086
5096
5087 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
5097 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
5088 to @file, since file() is now a builtin and clashes with automagic
5098 to @file, since file() is now a builtin and clashes with automagic
5089 for @file.
5099 for @file.
5090
5100
5091 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
5101 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
5092 of this was previously in iplib, which had grown to more than 2000
5102 of this was previously in iplib, which had grown to more than 2000
5093 lines, way too long. No new functionality, but it makes managing
5103 lines, way too long. No new functionality, but it makes managing
5094 the code a bit easier.
5104 the code a bit easier.
5095
5105
5096 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
5106 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
5097 information to crash reports.
5107 information to crash reports.
5098
5108
5099 2002-02-12 Fernando Perez <fperez@colorado.edu>
5109 2002-02-12 Fernando Perez <fperez@colorado.edu>
5100
5110
5101 * Released 0.2.5.
5111 * Released 0.2.5.
5102
5112
5103 2002-02-11 Fernando Perez <fperez@colorado.edu>
5113 2002-02-11 Fernando Perez <fperez@colorado.edu>
5104
5114
5105 * Wrote a relatively complete Windows installer. It puts
5115 * Wrote a relatively complete Windows installer. It puts
5106 everything in place, creates Start Menu entries and fixes the
5116 everything in place, creates Start Menu entries and fixes the
5107 color issues. Nothing fancy, but it works.
5117 color issues. Nothing fancy, but it works.
5108
5118
5109 2002-02-10 Fernando Perez <fperez@colorado.edu>
5119 2002-02-10 Fernando Perez <fperez@colorado.edu>
5110
5120
5111 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
5121 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
5112 os.path.expanduser() call so that we can type @run ~/myfile.py and
5122 os.path.expanduser() call so that we can type @run ~/myfile.py and
5113 have thigs work as expected.
5123 have thigs work as expected.
5114
5124
5115 * IPython/genutils.py (page): fixed exception handling so things
5125 * IPython/genutils.py (page): fixed exception handling so things
5116 work both in Unix and Windows correctly. Quitting a pager triggers
5126 work both in Unix and Windows correctly. Quitting a pager triggers
5117 an IOError/broken pipe in Unix, and in windows not finding a pager
5127 an IOError/broken pipe in Unix, and in windows not finding a pager
5118 is also an IOError, so I had to actually look at the return value
5128 is also an IOError, so I had to actually look at the return value
5119 of the exception, not just the exception itself. Should be ok now.
5129 of the exception, not just the exception itself. Should be ok now.
5120
5130
5121 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
5131 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
5122 modified to allow case-insensitive color scheme changes.
5132 modified to allow case-insensitive color scheme changes.
5123
5133
5124 2002-02-09 Fernando Perez <fperez@colorado.edu>
5134 2002-02-09 Fernando Perez <fperez@colorado.edu>
5125
5135
5126 * IPython/genutils.py (native_line_ends): new function to leave
5136 * IPython/genutils.py (native_line_ends): new function to leave
5127 user config files with os-native line-endings.
5137 user config files with os-native line-endings.
5128
5138
5129 * README and manual updates.
5139 * README and manual updates.
5130
5140
5131 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
5141 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
5132 instead of StringType to catch Unicode strings.
5142 instead of StringType to catch Unicode strings.
5133
5143
5134 * IPython/genutils.py (filefind): fixed bug for paths with
5144 * IPython/genutils.py (filefind): fixed bug for paths with
5135 embedded spaces (very common in Windows).
5145 embedded spaces (very common in Windows).
5136
5146
5137 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
5147 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
5138 files under Windows, so that they get automatically associated
5148 files under Windows, so that they get automatically associated
5139 with a text editor. Windows makes it a pain to handle
5149 with a text editor. Windows makes it a pain to handle
5140 extension-less files.
5150 extension-less files.
5141
5151
5142 * IPython/iplib.py (InteractiveShell.init_readline): Made the
5152 * IPython/iplib.py (InteractiveShell.init_readline): Made the
5143 warning about readline only occur for Posix. In Windows there's no
5153 warning about readline only occur for Posix. In Windows there's no
5144 way to get readline, so why bother with the warning.
5154 way to get readline, so why bother with the warning.
5145
5155
5146 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
5156 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
5147 for __str__ instead of dir(self), since dir() changed in 2.2.
5157 for __str__ instead of dir(self), since dir() changed in 2.2.
5148
5158
5149 * Ported to Windows! Tested on XP, I suspect it should work fine
5159 * Ported to Windows! Tested on XP, I suspect it should work fine
5150 on NT/2000, but I don't think it will work on 98 et al. That
5160 on NT/2000, but I don't think it will work on 98 et al. That
5151 series of Windows is such a piece of junk anyway that I won't try
5161 series of Windows is such a piece of junk anyway that I won't try
5152 porting it there. The XP port was straightforward, showed a few
5162 porting it there. The XP port was straightforward, showed a few
5153 bugs here and there (fixed all), in particular some string
5163 bugs here and there (fixed all), in particular some string
5154 handling stuff which required considering Unicode strings (which
5164 handling stuff which required considering Unicode strings (which
5155 Windows uses). This is good, but hasn't been too tested :) No
5165 Windows uses). This is good, but hasn't been too tested :) No
5156 fancy installer yet, I'll put a note in the manual so people at
5166 fancy installer yet, I'll put a note in the manual so people at
5157 least make manually a shortcut.
5167 least make manually a shortcut.
5158
5168
5159 * IPython/iplib.py (Magic.magic_colors): Unified the color options
5169 * IPython/iplib.py (Magic.magic_colors): Unified the color options
5160 into a single one, "colors". This now controls both prompt and
5170 into a single one, "colors". This now controls both prompt and
5161 exception color schemes, and can be changed both at startup
5171 exception color schemes, and can be changed both at startup
5162 (either via command-line switches or via ipythonrc files) and at
5172 (either via command-line switches or via ipythonrc files) and at
5163 runtime, with @colors.
5173 runtime, with @colors.
5164 (Magic.magic_run): renamed @prun to @run and removed the old
5174 (Magic.magic_run): renamed @prun to @run and removed the old
5165 @run. The two were too similar to warrant keeping both.
5175 @run. The two were too similar to warrant keeping both.
5166
5176
5167 2002-02-03 Fernando Perez <fperez@colorado.edu>
5177 2002-02-03 Fernando Perez <fperez@colorado.edu>
5168
5178
5169 * IPython/iplib.py (install_first_time): Added comment on how to
5179 * IPython/iplib.py (install_first_time): Added comment on how to
5170 configure the color options for first-time users. Put a <return>
5180 configure the color options for first-time users. Put a <return>
5171 request at the end so that small-terminal users get a chance to
5181 request at the end so that small-terminal users get a chance to
5172 read the startup info.
5182 read the startup info.
5173
5183
5174 2002-01-23 Fernando Perez <fperez@colorado.edu>
5184 2002-01-23 Fernando Perez <fperez@colorado.edu>
5175
5185
5176 * IPython/iplib.py (CachedOutput.update): Changed output memory
5186 * IPython/iplib.py (CachedOutput.update): Changed output memory
5177 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
5187 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
5178 input history we still use _i. Did this b/c these variable are
5188 input history we still use _i. Did this b/c these variable are
5179 very commonly used in interactive work, so the less we need to
5189 very commonly used in interactive work, so the less we need to
5180 type the better off we are.
5190 type the better off we are.
5181 (Magic.magic_prun): updated @prun to better handle the namespaces
5191 (Magic.magic_prun): updated @prun to better handle the namespaces
5182 the file will run in, including a fix for __name__ not being set
5192 the file will run in, including a fix for __name__ not being set
5183 before.
5193 before.
5184
5194
5185 2002-01-20 Fernando Perez <fperez@colorado.edu>
5195 2002-01-20 Fernando Perez <fperez@colorado.edu>
5186
5196
5187 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
5197 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
5188 extra garbage for Python 2.2. Need to look more carefully into
5198 extra garbage for Python 2.2. Need to look more carefully into
5189 this later.
5199 this later.
5190
5200
5191 2002-01-19 Fernando Perez <fperez@colorado.edu>
5201 2002-01-19 Fernando Perez <fperez@colorado.edu>
5192
5202
5193 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
5203 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
5194 display SyntaxError exceptions properly formatted when they occur
5204 display SyntaxError exceptions properly formatted when they occur
5195 (they can be triggered by imported code).
5205 (they can be triggered by imported code).
5196
5206
5197 2002-01-18 Fernando Perez <fperez@colorado.edu>
5207 2002-01-18 Fernando Perez <fperez@colorado.edu>
5198
5208
5199 * IPython/iplib.py (InteractiveShell.safe_execfile): now
5209 * IPython/iplib.py (InteractiveShell.safe_execfile): now
5200 SyntaxError exceptions are reported nicely formatted, instead of
5210 SyntaxError exceptions are reported nicely formatted, instead of
5201 spitting out only offset information as before.
5211 spitting out only offset information as before.
5202 (Magic.magic_prun): Added the @prun function for executing
5212 (Magic.magic_prun): Added the @prun function for executing
5203 programs with command line args inside IPython.
5213 programs with command line args inside IPython.
5204
5214
5205 2002-01-16 Fernando Perez <fperez@colorado.edu>
5215 2002-01-16 Fernando Perez <fperez@colorado.edu>
5206
5216
5207 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
5217 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
5208 to *not* include the last item given in a range. This brings their
5218 to *not* include the last item given in a range. This brings their
5209 behavior in line with Python's slicing:
5219 behavior in line with Python's slicing:
5210 a[n1:n2] -> a[n1]...a[n2-1]
5220 a[n1:n2] -> a[n1]...a[n2-1]
5211 It may be a bit less convenient, but I prefer to stick to Python's
5221 It may be a bit less convenient, but I prefer to stick to Python's
5212 conventions *everywhere*, so users never have to wonder.
5222 conventions *everywhere*, so users never have to wonder.
5213 (Magic.magic_macro): Added @macro function to ease the creation of
5223 (Magic.magic_macro): Added @macro function to ease the creation of
5214 macros.
5224 macros.
5215
5225
5216 2002-01-05 Fernando Perez <fperez@colorado.edu>
5226 2002-01-05 Fernando Perez <fperez@colorado.edu>
5217
5227
5218 * Released 0.2.4.
5228 * Released 0.2.4.
5219
5229
5220 * IPython/iplib.py (Magic.magic_pdef):
5230 * IPython/iplib.py (Magic.magic_pdef):
5221 (InteractiveShell.safe_execfile): report magic lines and error
5231 (InteractiveShell.safe_execfile): report magic lines and error
5222 lines without line numbers so one can easily copy/paste them for
5232 lines without line numbers so one can easily copy/paste them for
5223 re-execution.
5233 re-execution.
5224
5234
5225 * Updated manual with recent changes.
5235 * Updated manual with recent changes.
5226
5236
5227 * IPython/iplib.py (Magic.magic_oinfo): added constructor
5237 * IPython/iplib.py (Magic.magic_oinfo): added constructor
5228 docstring printing when class? is called. Very handy for knowing
5238 docstring printing when class? is called. Very handy for knowing
5229 how to create class instances (as long as __init__ is well
5239 how to create class instances (as long as __init__ is well
5230 documented, of course :)
5240 documented, of course :)
5231 (Magic.magic_doc): print both class and constructor docstrings.
5241 (Magic.magic_doc): print both class and constructor docstrings.
5232 (Magic.magic_pdef): give constructor info if passed a class and
5242 (Magic.magic_pdef): give constructor info if passed a class and
5233 __call__ info for callable object instances.
5243 __call__ info for callable object instances.
5234
5244
5235 2002-01-04 Fernando Perez <fperez@colorado.edu>
5245 2002-01-04 Fernando Perez <fperez@colorado.edu>
5236
5246
5237 * Made deep_reload() off by default. It doesn't always work
5247 * Made deep_reload() off by default. It doesn't always work
5238 exactly as intended, so it's probably safer to have it off. It's
5248 exactly as intended, so it's probably safer to have it off. It's
5239 still available as dreload() anyway, so nothing is lost.
5249 still available as dreload() anyway, so nothing is lost.
5240
5250
5241 2002-01-02 Fernando Perez <fperez@colorado.edu>
5251 2002-01-02 Fernando Perez <fperez@colorado.edu>
5242
5252
5243 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
5253 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
5244 so I wanted an updated release).
5254 so I wanted an updated release).
5245
5255
5246 2001-12-27 Fernando Perez <fperez@colorado.edu>
5256 2001-12-27 Fernando Perez <fperez@colorado.edu>
5247
5257
5248 * IPython/iplib.py (InteractiveShell.interact): Added the original
5258 * IPython/iplib.py (InteractiveShell.interact): Added the original
5249 code from 'code.py' for this module in order to change the
5259 code from 'code.py' for this module in order to change the
5250 handling of a KeyboardInterrupt. This was necessary b/c otherwise
5260 handling of a KeyboardInterrupt. This was necessary b/c otherwise
5251 the history cache would break when the user hit Ctrl-C, and
5261 the history cache would break when the user hit Ctrl-C, and
5252 interact() offers no way to add any hooks to it.
5262 interact() offers no way to add any hooks to it.
5253
5263
5254 2001-12-23 Fernando Perez <fperez@colorado.edu>
5264 2001-12-23 Fernando Perez <fperez@colorado.edu>
5255
5265
5256 * setup.py: added check for 'MANIFEST' before trying to remove
5266 * setup.py: added check for 'MANIFEST' before trying to remove
5257 it. Thanks to Sean Reifschneider.
5267 it. Thanks to Sean Reifschneider.
5258
5268
5259 2001-12-22 Fernando Perez <fperez@colorado.edu>
5269 2001-12-22 Fernando Perez <fperez@colorado.edu>
5260
5270
5261 * Released 0.2.2.
5271 * Released 0.2.2.
5262
5272
5263 * Finished (reasonably) writing the manual. Later will add the
5273 * Finished (reasonably) writing the manual. Later will add the
5264 python-standard navigation stylesheets, but for the time being
5274 python-standard navigation stylesheets, but for the time being
5265 it's fairly complete. Distribution will include html and pdf
5275 it's fairly complete. Distribution will include html and pdf
5266 versions.
5276 versions.
5267
5277
5268 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
5278 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
5269 (MayaVi author).
5279 (MayaVi author).
5270
5280
5271 2001-12-21 Fernando Perez <fperez@colorado.edu>
5281 2001-12-21 Fernando Perez <fperez@colorado.edu>
5272
5282
5273 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
5283 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
5274 good public release, I think (with the manual and the distutils
5284 good public release, I think (with the manual and the distutils
5275 installer). The manual can use some work, but that can go
5285 installer). The manual can use some work, but that can go
5276 slowly. Otherwise I think it's quite nice for end users. Next
5286 slowly. Otherwise I think it's quite nice for end users. Next
5277 summer, rewrite the guts of it...
5287 summer, rewrite the guts of it...
5278
5288
5279 * Changed format of ipythonrc files to use whitespace as the
5289 * Changed format of ipythonrc files to use whitespace as the
5280 separator instead of an explicit '='. Cleaner.
5290 separator instead of an explicit '='. Cleaner.
5281
5291
5282 2001-12-20 Fernando Perez <fperez@colorado.edu>
5292 2001-12-20 Fernando Perez <fperez@colorado.edu>
5283
5293
5284 * Started a manual in LyX. For now it's just a quick merge of the
5294 * Started a manual in LyX. For now it's just a quick merge of the
5285 various internal docstrings and READMEs. Later it may grow into a
5295 various internal docstrings and READMEs. Later it may grow into a
5286 nice, full-blown manual.
5296 nice, full-blown manual.
5287
5297
5288 * Set up a distutils based installer. Installation should now be
5298 * Set up a distutils based installer. Installation should now be
5289 trivially simple for end-users.
5299 trivially simple for end-users.
5290
5300
5291 2001-12-11 Fernando Perez <fperez@colorado.edu>
5301 2001-12-11 Fernando Perez <fperez@colorado.edu>
5292
5302
5293 * Released 0.2.0. First public release, announced it at
5303 * Released 0.2.0. First public release, announced it at
5294 comp.lang.python. From now on, just bugfixes...
5304 comp.lang.python. From now on, just bugfixes...
5295
5305
5296 * Went through all the files, set copyright/license notices and
5306 * Went through all the files, set copyright/license notices and
5297 cleaned up things. Ready for release.
5307 cleaned up things. Ready for release.
5298
5308
5299 2001-12-10 Fernando Perez <fperez@colorado.edu>
5309 2001-12-10 Fernando Perez <fperez@colorado.edu>
5300
5310
5301 * Changed the first-time installer not to use tarfiles. It's more
5311 * Changed the first-time installer not to use tarfiles. It's more
5302 robust now and less unix-dependent. Also makes it easier for
5312 robust now and less unix-dependent. Also makes it easier for
5303 people to later upgrade versions.
5313 people to later upgrade versions.
5304
5314
5305 * Changed @exit to @abort to reflect the fact that it's pretty
5315 * Changed @exit to @abort to reflect the fact that it's pretty
5306 brutal (a sys.exit()). The difference between @abort and Ctrl-D
5316 brutal (a sys.exit()). The difference between @abort and Ctrl-D
5307 becomes significant only when IPyhton is embedded: in that case,
5317 becomes significant only when IPyhton is embedded: in that case,
5308 C-D closes IPython only, but @abort kills the enclosing program
5318 C-D closes IPython only, but @abort kills the enclosing program
5309 too (unless it had called IPython inside a try catching
5319 too (unless it had called IPython inside a try catching
5310 SystemExit).
5320 SystemExit).
5311
5321
5312 * Created Shell module which exposes the actuall IPython Shell
5322 * Created Shell module which exposes the actuall IPython Shell
5313 classes, currently the normal and the embeddable one. This at
5323 classes, currently the normal and the embeddable one. This at
5314 least offers a stable interface we won't need to change when
5324 least offers a stable interface we won't need to change when
5315 (later) the internals are rewritten. That rewrite will be confined
5325 (later) the internals are rewritten. That rewrite will be confined
5316 to iplib and ipmaker, but the Shell interface should remain as is.
5326 to iplib and ipmaker, but the Shell interface should remain as is.
5317
5327
5318 * Added embed module which offers an embeddable IPShell object,
5328 * Added embed module which offers an embeddable IPShell object,
5319 useful to fire up IPython *inside* a running program. Great for
5329 useful to fire up IPython *inside* a running program. Great for
5320 debugging or dynamical data analysis.
5330 debugging or dynamical data analysis.
5321
5331
5322 2001-12-08 Fernando Perez <fperez@colorado.edu>
5332 2001-12-08 Fernando Perez <fperez@colorado.edu>
5323
5333
5324 * Fixed small bug preventing seeing info from methods of defined
5334 * Fixed small bug preventing seeing info from methods of defined
5325 objects (incorrect namespace in _ofind()).
5335 objects (incorrect namespace in _ofind()).
5326
5336
5327 * Documentation cleanup. Moved the main usage docstrings to a
5337 * Documentation cleanup. Moved the main usage docstrings to a
5328 separate file, usage.py (cleaner to maintain, and hopefully in the
5338 separate file, usage.py (cleaner to maintain, and hopefully in the
5329 future some perlpod-like way of producing interactive, man and
5339 future some perlpod-like way of producing interactive, man and
5330 html docs out of it will be found).
5340 html docs out of it will be found).
5331
5341
5332 * Added @profile to see your profile at any time.
5342 * Added @profile to see your profile at any time.
5333
5343
5334 * Added @p as an alias for 'print'. It's especially convenient if
5344 * Added @p as an alias for 'print'. It's especially convenient if
5335 using automagic ('p x' prints x).
5345 using automagic ('p x' prints x).
5336
5346
5337 * Small cleanups and fixes after a pychecker run.
5347 * Small cleanups and fixes after a pychecker run.
5338
5348
5339 * Changed the @cd command to handle @cd - and @cd -<n> for
5349 * Changed the @cd command to handle @cd - and @cd -<n> for
5340 visiting any directory in _dh.
5350 visiting any directory in _dh.
5341
5351
5342 * Introduced _dh, a history of visited directories. @dhist prints
5352 * Introduced _dh, a history of visited directories. @dhist prints
5343 it out with numbers.
5353 it out with numbers.
5344
5354
5345 2001-12-07 Fernando Perez <fperez@colorado.edu>
5355 2001-12-07 Fernando Perez <fperez@colorado.edu>
5346
5356
5347 * Released 0.1.22
5357 * Released 0.1.22
5348
5358
5349 * Made initialization a bit more robust against invalid color
5359 * Made initialization a bit more robust against invalid color
5350 options in user input (exit, not traceback-crash).
5360 options in user input (exit, not traceback-crash).
5351
5361
5352 * Changed the bug crash reporter to write the report only in the
5362 * Changed the bug crash reporter to write the report only in the
5353 user's .ipython directory. That way IPython won't litter people's
5363 user's .ipython directory. That way IPython won't litter people's
5354 hard disks with crash files all over the place. Also print on
5364 hard disks with crash files all over the place. Also print on
5355 screen the necessary mail command.
5365 screen the necessary mail command.
5356
5366
5357 * With the new ultraTB, implemented LightBG color scheme for light
5367 * With the new ultraTB, implemented LightBG color scheme for light
5358 background terminals. A lot of people like white backgrounds, so I
5368 background terminals. A lot of people like white backgrounds, so I
5359 guess we should at least give them something readable.
5369 guess we should at least give them something readable.
5360
5370
5361 2001-12-06 Fernando Perez <fperez@colorado.edu>
5371 2001-12-06 Fernando Perez <fperez@colorado.edu>
5362
5372
5363 * Modified the structure of ultraTB. Now there's a proper class
5373 * Modified the structure of ultraTB. Now there's a proper class
5364 for tables of color schemes which allow adding schemes easily and
5374 for tables of color schemes which allow adding schemes easily and
5365 switching the active scheme without creating a new instance every
5375 switching the active scheme without creating a new instance every
5366 time (which was ridiculous). The syntax for creating new schemes
5376 time (which was ridiculous). The syntax for creating new schemes
5367 is also cleaner. I think ultraTB is finally done, with a clean
5377 is also cleaner. I think ultraTB is finally done, with a clean
5368 class structure. Names are also much cleaner (now there's proper
5378 class structure. Names are also much cleaner (now there's proper
5369 color tables, no need for every variable to also have 'color' in
5379 color tables, no need for every variable to also have 'color' in
5370 its name).
5380 its name).
5371
5381
5372 * Broke down genutils into separate files. Now genutils only
5382 * Broke down genutils into separate files. Now genutils only
5373 contains utility functions, and classes have been moved to their
5383 contains utility functions, and classes have been moved to their
5374 own files (they had enough independent functionality to warrant
5384 own files (they had enough independent functionality to warrant
5375 it): ConfigLoader, OutputTrap, Struct.
5385 it): ConfigLoader, OutputTrap, Struct.
5376
5386
5377 2001-12-05 Fernando Perez <fperez@colorado.edu>
5387 2001-12-05 Fernando Perez <fperez@colorado.edu>
5378
5388
5379 * IPython turns 21! Released version 0.1.21, as a candidate for
5389 * IPython turns 21! Released version 0.1.21, as a candidate for
5380 public consumption. If all goes well, release in a few days.
5390 public consumption. If all goes well, release in a few days.
5381
5391
5382 * Fixed path bug (files in Extensions/ directory wouldn't be found
5392 * Fixed path bug (files in Extensions/ directory wouldn't be found
5383 unless IPython/ was explicitly in sys.path).
5393 unless IPython/ was explicitly in sys.path).
5384
5394
5385 * Extended the FlexCompleter class as MagicCompleter to allow
5395 * Extended the FlexCompleter class as MagicCompleter to allow
5386 completion of @-starting lines.
5396 completion of @-starting lines.
5387
5397
5388 * Created __release__.py file as a central repository for release
5398 * Created __release__.py file as a central repository for release
5389 info that other files can read from.
5399 info that other files can read from.
5390
5400
5391 * Fixed small bug in logging: when logging was turned on in
5401 * Fixed small bug in logging: when logging was turned on in
5392 mid-session, old lines with special meanings (!@?) were being
5402 mid-session, old lines with special meanings (!@?) were being
5393 logged without the prepended comment, which is necessary since
5403 logged without the prepended comment, which is necessary since
5394 they are not truly valid python syntax. This should make session
5404 they are not truly valid python syntax. This should make session
5395 restores produce less errors.
5405 restores produce less errors.
5396
5406
5397 * The namespace cleanup forced me to make a FlexCompleter class
5407 * The namespace cleanup forced me to make a FlexCompleter class
5398 which is nothing but a ripoff of rlcompleter, but with selectable
5408 which is nothing but a ripoff of rlcompleter, but with selectable
5399 namespace (rlcompleter only works in __main__.__dict__). I'll try
5409 namespace (rlcompleter only works in __main__.__dict__). I'll try
5400 to submit a note to the authors to see if this change can be
5410 to submit a note to the authors to see if this change can be
5401 incorporated in future rlcompleter releases (Dec.6: done)
5411 incorporated in future rlcompleter releases (Dec.6: done)
5402
5412
5403 * More fixes to namespace handling. It was a mess! Now all
5413 * More fixes to namespace handling. It was a mess! Now all
5404 explicit references to __main__.__dict__ are gone (except when
5414 explicit references to __main__.__dict__ are gone (except when
5405 really needed) and everything is handled through the namespace
5415 really needed) and everything is handled through the namespace
5406 dicts in the IPython instance. We seem to be getting somewhere
5416 dicts in the IPython instance. We seem to be getting somewhere
5407 with this, finally...
5417 with this, finally...
5408
5418
5409 * Small documentation updates.
5419 * Small documentation updates.
5410
5420
5411 * Created the Extensions directory under IPython (with an
5421 * Created the Extensions directory under IPython (with an
5412 __init__.py). Put the PhysicalQ stuff there. This directory should
5422 __init__.py). Put the PhysicalQ stuff there. This directory should
5413 be used for all special-purpose extensions.
5423 be used for all special-purpose extensions.
5414
5424
5415 * File renaming:
5425 * File renaming:
5416 ipythonlib --> ipmaker
5426 ipythonlib --> ipmaker
5417 ipplib --> iplib
5427 ipplib --> iplib
5418 This makes a bit more sense in terms of what these files actually do.
5428 This makes a bit more sense in terms of what these files actually do.
5419
5429
5420 * Moved all the classes and functions in ipythonlib to ipplib, so
5430 * Moved all the classes and functions in ipythonlib to ipplib, so
5421 now ipythonlib only has make_IPython(). This will ease up its
5431 now ipythonlib only has make_IPython(). This will ease up its
5422 splitting in smaller functional chunks later.
5432 splitting in smaller functional chunks later.
5423
5433
5424 * Cleaned up (done, I think) output of @whos. Better column
5434 * Cleaned up (done, I think) output of @whos. Better column
5425 formatting, and now shows str(var) for as much as it can, which is
5435 formatting, and now shows str(var) for as much as it can, which is
5426 typically what one gets with a 'print var'.
5436 typically what one gets with a 'print var'.
5427
5437
5428 2001-12-04 Fernando Perez <fperez@colorado.edu>
5438 2001-12-04 Fernando Perez <fperez@colorado.edu>
5429
5439
5430 * Fixed namespace problems. Now builtin/IPyhton/user names get
5440 * Fixed namespace problems. Now builtin/IPyhton/user names get
5431 properly reported in their namespace. Internal namespace handling
5441 properly reported in their namespace. Internal namespace handling
5432 is finally getting decent (not perfect yet, but much better than
5442 is finally getting decent (not perfect yet, but much better than
5433 the ad-hoc mess we had).
5443 the ad-hoc mess we had).
5434
5444
5435 * Removed -exit option. If people just want to run a python
5445 * Removed -exit option. If people just want to run a python
5436 script, that's what the normal interpreter is for. Less
5446 script, that's what the normal interpreter is for. Less
5437 unnecessary options, less chances for bugs.
5447 unnecessary options, less chances for bugs.
5438
5448
5439 * Added a crash handler which generates a complete post-mortem if
5449 * Added a crash handler which generates a complete post-mortem if
5440 IPython crashes. This will help a lot in tracking bugs down the
5450 IPython crashes. This will help a lot in tracking bugs down the
5441 road.
5451 road.
5442
5452
5443 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
5453 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
5444 which were boud to functions being reassigned would bypass the
5454 which were boud to functions being reassigned would bypass the
5445 logger, breaking the sync of _il with the prompt counter. This
5455 logger, breaking the sync of _il with the prompt counter. This
5446 would then crash IPython later when a new line was logged.
5456 would then crash IPython later when a new line was logged.
5447
5457
5448 2001-12-02 Fernando Perez <fperez@colorado.edu>
5458 2001-12-02 Fernando Perez <fperez@colorado.edu>
5449
5459
5450 * Made IPython a package. This means people don't have to clutter
5460 * Made IPython a package. This means people don't have to clutter
5451 their sys.path with yet another directory. Changed the INSTALL
5461 their sys.path with yet another directory. Changed the INSTALL
5452 file accordingly.
5462 file accordingly.
5453
5463
5454 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
5464 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
5455 sorts its output (so @who shows it sorted) and @whos formats the
5465 sorts its output (so @who shows it sorted) and @whos formats the
5456 table according to the width of the first column. Nicer, easier to
5466 table according to the width of the first column. Nicer, easier to
5457 read. Todo: write a generic table_format() which takes a list of
5467 read. Todo: write a generic table_format() which takes a list of
5458 lists and prints it nicely formatted, with optional row/column
5468 lists and prints it nicely formatted, with optional row/column
5459 separators and proper padding and justification.
5469 separators and proper padding and justification.
5460
5470
5461 * Released 0.1.20
5471 * Released 0.1.20
5462
5472
5463 * Fixed bug in @log which would reverse the inputcache list (a
5473 * Fixed bug in @log which would reverse the inputcache list (a
5464 copy operation was missing).
5474 copy operation was missing).
5465
5475
5466 * Code cleanup. @config was changed to use page(). Better, since
5476 * Code cleanup. @config was changed to use page(). Better, since
5467 its output is always quite long.
5477 its output is always quite long.
5468
5478
5469 * Itpl is back as a dependency. I was having too many problems
5479 * Itpl is back as a dependency. I was having too many problems
5470 getting the parametric aliases to work reliably, and it's just
5480 getting the parametric aliases to work reliably, and it's just
5471 easier to code weird string operations with it than playing %()s
5481 easier to code weird string operations with it than playing %()s
5472 games. It's only ~6k, so I don't think it's too big a deal.
5482 games. It's only ~6k, so I don't think it's too big a deal.
5473
5483
5474 * Found (and fixed) a very nasty bug with history. !lines weren't
5484 * Found (and fixed) a very nasty bug with history. !lines weren't
5475 getting cached, and the out of sync caches would crash
5485 getting cached, and the out of sync caches would crash
5476 IPython. Fixed it by reorganizing the prefilter/handlers/logger
5486 IPython. Fixed it by reorganizing the prefilter/handlers/logger
5477 division of labor a bit better. Bug fixed, cleaner structure.
5487 division of labor a bit better. Bug fixed, cleaner structure.
5478
5488
5479 2001-12-01 Fernando Perez <fperez@colorado.edu>
5489 2001-12-01 Fernando Perez <fperez@colorado.edu>
5480
5490
5481 * Released 0.1.19
5491 * Released 0.1.19
5482
5492
5483 * Added option -n to @hist to prevent line number printing. Much
5493 * Added option -n to @hist to prevent line number printing. Much
5484 easier to copy/paste code this way.
5494 easier to copy/paste code this way.
5485
5495
5486 * Created global _il to hold the input list. Allows easy
5496 * Created global _il to hold the input list. Allows easy
5487 re-execution of blocks of code by slicing it (inspired by Janko's
5497 re-execution of blocks of code by slicing it (inspired by Janko's
5488 comment on 'macros').
5498 comment on 'macros').
5489
5499
5490 * Small fixes and doc updates.
5500 * Small fixes and doc updates.
5491
5501
5492 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5502 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5493 much too fragile with automagic. Handles properly multi-line
5503 much too fragile with automagic. Handles properly multi-line
5494 statements and takes parameters.
5504 statements and takes parameters.
5495
5505
5496 2001-11-30 Fernando Perez <fperez@colorado.edu>
5506 2001-11-30 Fernando Perez <fperez@colorado.edu>
5497
5507
5498 * Version 0.1.18 released.
5508 * Version 0.1.18 released.
5499
5509
5500 * Fixed nasty namespace bug in initial module imports.
5510 * Fixed nasty namespace bug in initial module imports.
5501
5511
5502 * Added copyright/license notes to all code files (except
5512 * Added copyright/license notes to all code files (except
5503 DPyGetOpt). For the time being, LGPL. That could change.
5513 DPyGetOpt). For the time being, LGPL. That could change.
5504
5514
5505 * Rewrote a much nicer README, updated INSTALL, cleaned up
5515 * Rewrote a much nicer README, updated INSTALL, cleaned up
5506 ipythonrc-* samples.
5516 ipythonrc-* samples.
5507
5517
5508 * Overall code/documentation cleanup. Basically ready for
5518 * Overall code/documentation cleanup. Basically ready for
5509 release. Only remaining thing: licence decision (LGPL?).
5519 release. Only remaining thing: licence decision (LGPL?).
5510
5520
5511 * Converted load_config to a class, ConfigLoader. Now recursion
5521 * Converted load_config to a class, ConfigLoader. Now recursion
5512 control is better organized. Doesn't include the same file twice.
5522 control is better organized. Doesn't include the same file twice.
5513
5523
5514 2001-11-29 Fernando Perez <fperez@colorado.edu>
5524 2001-11-29 Fernando Perez <fperez@colorado.edu>
5515
5525
5516 * Got input history working. Changed output history variables from
5526 * Got input history working. Changed output history variables from
5517 _p to _o so that _i is for input and _o for output. Just cleaner
5527 _p to _o so that _i is for input and _o for output. Just cleaner
5518 convention.
5528 convention.
5519
5529
5520 * Implemented parametric aliases. This pretty much allows the
5530 * Implemented parametric aliases. This pretty much allows the
5521 alias system to offer full-blown shell convenience, I think.
5531 alias system to offer full-blown shell convenience, I think.
5522
5532
5523 * Version 0.1.17 released, 0.1.18 opened.
5533 * Version 0.1.17 released, 0.1.18 opened.
5524
5534
5525 * dot_ipython/ipythonrc (alias): added documentation.
5535 * dot_ipython/ipythonrc (alias): added documentation.
5526 (xcolor): Fixed small bug (xcolors -> xcolor)
5536 (xcolor): Fixed small bug (xcolors -> xcolor)
5527
5537
5528 * Changed the alias system. Now alias is a magic command to define
5538 * Changed the alias system. Now alias is a magic command to define
5529 aliases just like the shell. Rationale: the builtin magics should
5539 aliases just like the shell. Rationale: the builtin magics should
5530 be there for things deeply connected to IPython's
5540 be there for things deeply connected to IPython's
5531 architecture. And this is a much lighter system for what I think
5541 architecture. And this is a much lighter system for what I think
5532 is the really important feature: allowing users to define quickly
5542 is the really important feature: allowing users to define quickly
5533 magics that will do shell things for them, so they can customize
5543 magics that will do shell things for them, so they can customize
5534 IPython easily to match their work habits. If someone is really
5544 IPython easily to match their work habits. If someone is really
5535 desperate to have another name for a builtin alias, they can
5545 desperate to have another name for a builtin alias, they can
5536 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5546 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5537 works.
5547 works.
5538
5548
5539 2001-11-28 Fernando Perez <fperez@colorado.edu>
5549 2001-11-28 Fernando Perez <fperez@colorado.edu>
5540
5550
5541 * Changed @file so that it opens the source file at the proper
5551 * Changed @file so that it opens the source file at the proper
5542 line. Since it uses less, if your EDITOR environment is
5552 line. Since it uses less, if your EDITOR environment is
5543 configured, typing v will immediately open your editor of choice
5553 configured, typing v will immediately open your editor of choice
5544 right at the line where the object is defined. Not as quick as
5554 right at the line where the object is defined. Not as quick as
5545 having a direct @edit command, but for all intents and purposes it
5555 having a direct @edit command, but for all intents and purposes it
5546 works. And I don't have to worry about writing @edit to deal with
5556 works. And I don't have to worry about writing @edit to deal with
5547 all the editors, less does that.
5557 all the editors, less does that.
5548
5558
5549 * Version 0.1.16 released, 0.1.17 opened.
5559 * Version 0.1.16 released, 0.1.17 opened.
5550
5560
5551 * Fixed some nasty bugs in the page/page_dumb combo that could
5561 * Fixed some nasty bugs in the page/page_dumb combo that could
5552 crash IPython.
5562 crash IPython.
5553
5563
5554 2001-11-27 Fernando Perez <fperez@colorado.edu>
5564 2001-11-27 Fernando Perez <fperez@colorado.edu>
5555
5565
5556 * Version 0.1.15 released, 0.1.16 opened.
5566 * Version 0.1.15 released, 0.1.16 opened.
5557
5567
5558 * Finally got ? and ?? to work for undefined things: now it's
5568 * Finally got ? and ?? to work for undefined things: now it's
5559 possible to type {}.get? and get information about the get method
5569 possible to type {}.get? and get information about the get method
5560 of dicts, or os.path? even if only os is defined (so technically
5570 of dicts, or os.path? even if only os is defined (so technically
5561 os.path isn't). Works at any level. For example, after import os,
5571 os.path isn't). Works at any level. For example, after import os,
5562 os?, os.path?, os.path.abspath? all work. This is great, took some
5572 os?, os.path?, os.path.abspath? all work. This is great, took some
5563 work in _ofind.
5573 work in _ofind.
5564
5574
5565 * Fixed more bugs with logging. The sanest way to do it was to add
5575 * Fixed more bugs with logging. The sanest way to do it was to add
5566 to @log a 'mode' parameter. Killed two in one shot (this mode
5576 to @log a 'mode' parameter. Killed two in one shot (this mode
5567 option was a request of Janko's). I think it's finally clean
5577 option was a request of Janko's). I think it's finally clean
5568 (famous last words).
5578 (famous last words).
5569
5579
5570 * Added a page_dumb() pager which does a decent job of paging on
5580 * Added a page_dumb() pager which does a decent job of paging on
5571 screen, if better things (like less) aren't available. One less
5581 screen, if better things (like less) aren't available. One less
5572 unix dependency (someday maybe somebody will port this to
5582 unix dependency (someday maybe somebody will port this to
5573 windows).
5583 windows).
5574
5584
5575 * Fixed problem in magic_log: would lock of logging out if log
5585 * Fixed problem in magic_log: would lock of logging out if log
5576 creation failed (because it would still think it had succeeded).
5586 creation failed (because it would still think it had succeeded).
5577
5587
5578 * Improved the page() function using curses to auto-detect screen
5588 * Improved the page() function using curses to auto-detect screen
5579 size. Now it can make a much better decision on whether to print
5589 size. Now it can make a much better decision on whether to print
5580 or page a string. Option screen_length was modified: a value 0
5590 or page a string. Option screen_length was modified: a value 0
5581 means auto-detect, and that's the default now.
5591 means auto-detect, and that's the default now.
5582
5592
5583 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5593 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5584 go out. I'll test it for a few days, then talk to Janko about
5594 go out. I'll test it for a few days, then talk to Janko about
5585 licences and announce it.
5595 licences and announce it.
5586
5596
5587 * Fixed the length of the auto-generated ---> prompt which appears
5597 * Fixed the length of the auto-generated ---> prompt which appears
5588 for auto-parens and auto-quotes. Getting this right isn't trivial,
5598 for auto-parens and auto-quotes. Getting this right isn't trivial,
5589 with all the color escapes, different prompt types and optional
5599 with all the color escapes, different prompt types and optional
5590 separators. But it seems to be working in all the combinations.
5600 separators. But it seems to be working in all the combinations.
5591
5601
5592 2001-11-26 Fernando Perez <fperez@colorado.edu>
5602 2001-11-26 Fernando Perez <fperez@colorado.edu>
5593
5603
5594 * Wrote a regexp filter to get option types from the option names
5604 * Wrote a regexp filter to get option types from the option names
5595 string. This eliminates the need to manually keep two duplicate
5605 string. This eliminates the need to manually keep two duplicate
5596 lists.
5606 lists.
5597
5607
5598 * Removed the unneeded check_option_names. Now options are handled
5608 * Removed the unneeded check_option_names. Now options are handled
5599 in a much saner manner and it's easy to visually check that things
5609 in a much saner manner and it's easy to visually check that things
5600 are ok.
5610 are ok.
5601
5611
5602 * Updated version numbers on all files I modified to carry a
5612 * Updated version numbers on all files I modified to carry a
5603 notice so Janko and Nathan have clear version markers.
5613 notice so Janko and Nathan have clear version markers.
5604
5614
5605 * Updated docstring for ultraTB with my changes. I should send
5615 * Updated docstring for ultraTB with my changes. I should send
5606 this to Nathan.
5616 this to Nathan.
5607
5617
5608 * Lots of small fixes. Ran everything through pychecker again.
5618 * Lots of small fixes. Ran everything through pychecker again.
5609
5619
5610 * Made loading of deep_reload an cmd line option. If it's not too
5620 * Made loading of deep_reload an cmd line option. If it's not too
5611 kosher, now people can just disable it. With -nodeep_reload it's
5621 kosher, now people can just disable it. With -nodeep_reload it's
5612 still available as dreload(), it just won't overwrite reload().
5622 still available as dreload(), it just won't overwrite reload().
5613
5623
5614 * Moved many options to the no| form (-opt and -noopt
5624 * Moved many options to the no| form (-opt and -noopt
5615 accepted). Cleaner.
5625 accepted). Cleaner.
5616
5626
5617 * Changed magic_log so that if called with no parameters, it uses
5627 * Changed magic_log so that if called with no parameters, it uses
5618 'rotate' mode. That way auto-generated logs aren't automatically
5628 'rotate' mode. That way auto-generated logs aren't automatically
5619 over-written. For normal logs, now a backup is made if it exists
5629 over-written. For normal logs, now a backup is made if it exists
5620 (only 1 level of backups). A new 'backup' mode was added to the
5630 (only 1 level of backups). A new 'backup' mode was added to the
5621 Logger class to support this. This was a request by Janko.
5631 Logger class to support this. This was a request by Janko.
5622
5632
5623 * Added @logoff/@logon to stop/restart an active log.
5633 * Added @logoff/@logon to stop/restart an active log.
5624
5634
5625 * Fixed a lot of bugs in log saving/replay. It was pretty
5635 * Fixed a lot of bugs in log saving/replay. It was pretty
5626 broken. Now special lines (!@,/) appear properly in the command
5636 broken. Now special lines (!@,/) appear properly in the command
5627 history after a log replay.
5637 history after a log replay.
5628
5638
5629 * Tried and failed to implement full session saving via pickle. My
5639 * Tried and failed to implement full session saving via pickle. My
5630 idea was to pickle __main__.__dict__, but modules can't be
5640 idea was to pickle __main__.__dict__, but modules can't be
5631 pickled. This would be a better alternative to replaying logs, but
5641 pickled. This would be a better alternative to replaying logs, but
5632 seems quite tricky to get to work. Changed -session to be called
5642 seems quite tricky to get to work. Changed -session to be called
5633 -logplay, which more accurately reflects what it does. And if we
5643 -logplay, which more accurately reflects what it does. And if we
5634 ever get real session saving working, -session is now available.
5644 ever get real session saving working, -session is now available.
5635
5645
5636 * Implemented color schemes for prompts also. As for tracebacks,
5646 * Implemented color schemes for prompts also. As for tracebacks,
5637 currently only NoColor and Linux are supported. But now the
5647 currently only NoColor and Linux are supported. But now the
5638 infrastructure is in place, based on a generic ColorScheme
5648 infrastructure is in place, based on a generic ColorScheme
5639 class. So writing and activating new schemes both for the prompts
5649 class. So writing and activating new schemes both for the prompts
5640 and the tracebacks should be straightforward.
5650 and the tracebacks should be straightforward.
5641
5651
5642 * Version 0.1.13 released, 0.1.14 opened.
5652 * Version 0.1.13 released, 0.1.14 opened.
5643
5653
5644 * Changed handling of options for output cache. Now counter is
5654 * Changed handling of options for output cache. Now counter is
5645 hardwired starting at 1 and one specifies the maximum number of
5655 hardwired starting at 1 and one specifies the maximum number of
5646 entries *in the outcache* (not the max prompt counter). This is
5656 entries *in the outcache* (not the max prompt counter). This is
5647 much better, since many statements won't increase the cache
5657 much better, since many statements won't increase the cache
5648 count. It also eliminated some confusing options, now there's only
5658 count. It also eliminated some confusing options, now there's only
5649 one: cache_size.
5659 one: cache_size.
5650
5660
5651 * Added 'alias' magic function and magic_alias option in the
5661 * Added 'alias' magic function and magic_alias option in the
5652 ipythonrc file. Now the user can easily define whatever names he
5662 ipythonrc file. Now the user can easily define whatever names he
5653 wants for the magic functions without having to play weird
5663 wants for the magic functions without having to play weird
5654 namespace games. This gives IPython a real shell-like feel.
5664 namespace games. This gives IPython a real shell-like feel.
5655
5665
5656 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5666 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5657 @ or not).
5667 @ or not).
5658
5668
5659 This was one of the last remaining 'visible' bugs (that I know
5669 This was one of the last remaining 'visible' bugs (that I know
5660 of). I think if I can clean up the session loading so it works
5670 of). I think if I can clean up the session loading so it works
5661 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5671 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5662 about licensing).
5672 about licensing).
5663
5673
5664 2001-11-25 Fernando Perez <fperez@colorado.edu>
5674 2001-11-25 Fernando Perez <fperez@colorado.edu>
5665
5675
5666 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5676 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5667 there's a cleaner distinction between what ? and ?? show.
5677 there's a cleaner distinction between what ? and ?? show.
5668
5678
5669 * Added screen_length option. Now the user can define his own
5679 * Added screen_length option. Now the user can define his own
5670 screen size for page() operations.
5680 screen size for page() operations.
5671
5681
5672 * Implemented magic shell-like functions with automatic code
5682 * Implemented magic shell-like functions with automatic code
5673 generation. Now adding another function is just a matter of adding
5683 generation. Now adding another function is just a matter of adding
5674 an entry to a dict, and the function is dynamically generated at
5684 an entry to a dict, and the function is dynamically generated at
5675 run-time. Python has some really cool features!
5685 run-time. Python has some really cool features!
5676
5686
5677 * Renamed many options to cleanup conventions a little. Now all
5687 * Renamed many options to cleanup conventions a little. Now all
5678 are lowercase, and only underscores where needed. Also in the code
5688 are lowercase, and only underscores where needed. Also in the code
5679 option name tables are clearer.
5689 option name tables are clearer.
5680
5690
5681 * Changed prompts a little. Now input is 'In [n]:' instead of
5691 * Changed prompts a little. Now input is 'In [n]:' instead of
5682 'In[n]:='. This allows it the numbers to be aligned with the
5692 'In[n]:='. This allows it the numbers to be aligned with the
5683 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5693 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5684 Python (it was a Mathematica thing). The '...' continuation prompt
5694 Python (it was a Mathematica thing). The '...' continuation prompt
5685 was also changed a little to align better.
5695 was also changed a little to align better.
5686
5696
5687 * Fixed bug when flushing output cache. Not all _p<n> variables
5697 * Fixed bug when flushing output cache. Not all _p<n> variables
5688 exist, so their deletion needs to be wrapped in a try:
5698 exist, so their deletion needs to be wrapped in a try:
5689
5699
5690 * Figured out how to properly use inspect.formatargspec() (it
5700 * Figured out how to properly use inspect.formatargspec() (it
5691 requires the args preceded by *). So I removed all the code from
5701 requires the args preceded by *). So I removed all the code from
5692 _get_pdef in Magic, which was just replicating that.
5702 _get_pdef in Magic, which was just replicating that.
5693
5703
5694 * Added test to prefilter to allow redefining magic function names
5704 * Added test to prefilter to allow redefining magic function names
5695 as variables. This is ok, since the @ form is always available,
5705 as variables. This is ok, since the @ form is always available,
5696 but whe should allow the user to define a variable called 'ls' if
5706 but whe should allow the user to define a variable called 'ls' if
5697 he needs it.
5707 he needs it.
5698
5708
5699 * Moved the ToDo information from README into a separate ToDo.
5709 * Moved the ToDo information from README into a separate ToDo.
5700
5710
5701 * General code cleanup and small bugfixes. I think it's close to a
5711 * General code cleanup and small bugfixes. I think it's close to a
5702 state where it can be released, obviously with a big 'beta'
5712 state where it can be released, obviously with a big 'beta'
5703 warning on it.
5713 warning on it.
5704
5714
5705 * Got the magic function split to work. Now all magics are defined
5715 * Got the magic function split to work. Now all magics are defined
5706 in a separate class. It just organizes things a bit, and now
5716 in a separate class. It just organizes things a bit, and now
5707 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5717 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5708 was too long).
5718 was too long).
5709
5719
5710 * Changed @clear to @reset to avoid potential confusions with
5720 * Changed @clear to @reset to avoid potential confusions with
5711 the shell command clear. Also renamed @cl to @clear, which does
5721 the shell command clear. Also renamed @cl to @clear, which does
5712 exactly what people expect it to from their shell experience.
5722 exactly what people expect it to from their shell experience.
5713
5723
5714 Added a check to the @reset command (since it's so
5724 Added a check to the @reset command (since it's so
5715 destructive, it's probably a good idea to ask for confirmation).
5725 destructive, it's probably a good idea to ask for confirmation).
5716 But now reset only works for full namespace resetting. Since the
5726 But now reset only works for full namespace resetting. Since the
5717 del keyword is already there for deleting a few specific
5727 del keyword is already there for deleting a few specific
5718 variables, I don't see the point of having a redundant magic
5728 variables, I don't see the point of having a redundant magic
5719 function for the same task.
5729 function for the same task.
5720
5730
5721 2001-11-24 Fernando Perez <fperez@colorado.edu>
5731 2001-11-24 Fernando Perez <fperez@colorado.edu>
5722
5732
5723 * Updated the builtin docs (esp. the ? ones).
5733 * Updated the builtin docs (esp. the ? ones).
5724
5734
5725 * Ran all the code through pychecker. Not terribly impressed with
5735 * Ran all the code through pychecker. Not terribly impressed with
5726 it: lots of spurious warnings and didn't really find anything of
5736 it: lots of spurious warnings and didn't really find anything of
5727 substance (just a few modules being imported and not used).
5737 substance (just a few modules being imported and not used).
5728
5738
5729 * Implemented the new ultraTB functionality into IPython. New
5739 * Implemented the new ultraTB functionality into IPython. New
5730 option: xcolors. This chooses color scheme. xmode now only selects
5740 option: xcolors. This chooses color scheme. xmode now only selects
5731 between Plain and Verbose. Better orthogonality.
5741 between Plain and Verbose. Better orthogonality.
5732
5742
5733 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5743 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5734 mode and color scheme for the exception handlers. Now it's
5744 mode and color scheme for the exception handlers. Now it's
5735 possible to have the verbose traceback with no coloring.
5745 possible to have the verbose traceback with no coloring.
5736
5746
5737 2001-11-23 Fernando Perez <fperez@colorado.edu>
5747 2001-11-23 Fernando Perez <fperez@colorado.edu>
5738
5748
5739 * Version 0.1.12 released, 0.1.13 opened.
5749 * Version 0.1.12 released, 0.1.13 opened.
5740
5750
5741 * Removed option to set auto-quote and auto-paren escapes by
5751 * Removed option to set auto-quote and auto-paren escapes by
5742 user. The chances of breaking valid syntax are just too high. If
5752 user. The chances of breaking valid syntax are just too high. If
5743 someone *really* wants, they can always dig into the code.
5753 someone *really* wants, they can always dig into the code.
5744
5754
5745 * Made prompt separators configurable.
5755 * Made prompt separators configurable.
5746
5756
5747 2001-11-22 Fernando Perez <fperez@colorado.edu>
5757 2001-11-22 Fernando Perez <fperez@colorado.edu>
5748
5758
5749 * Small bugfixes in many places.
5759 * Small bugfixes in many places.
5750
5760
5751 * Removed the MyCompleter class from ipplib. It seemed redundant
5761 * Removed the MyCompleter class from ipplib. It seemed redundant
5752 with the C-p,C-n history search functionality. Less code to
5762 with the C-p,C-n history search functionality. Less code to
5753 maintain.
5763 maintain.
5754
5764
5755 * Moved all the original ipython.py code into ipythonlib.py. Right
5765 * Moved all the original ipython.py code into ipythonlib.py. Right
5756 now it's just one big dump into a function called make_IPython, so
5766 now it's just one big dump into a function called make_IPython, so
5757 no real modularity has been gained. But at least it makes the
5767 no real modularity has been gained. But at least it makes the
5758 wrapper script tiny, and since ipythonlib is a module, it gets
5768 wrapper script tiny, and since ipythonlib is a module, it gets
5759 compiled and startup is much faster.
5769 compiled and startup is much faster.
5760
5770
5761 This is a reasobably 'deep' change, so we should test it for a
5771 This is a reasobably 'deep' change, so we should test it for a
5762 while without messing too much more with the code.
5772 while without messing too much more with the code.
5763
5773
5764 2001-11-21 Fernando Perez <fperez@colorado.edu>
5774 2001-11-21 Fernando Perez <fperez@colorado.edu>
5765
5775
5766 * Version 0.1.11 released, 0.1.12 opened for further work.
5776 * Version 0.1.11 released, 0.1.12 opened for further work.
5767
5777
5768 * Removed dependency on Itpl. It was only needed in one place. It
5778 * Removed dependency on Itpl. It was only needed in one place. It
5769 would be nice if this became part of python, though. It makes life
5779 would be nice if this became part of python, though. It makes life
5770 *a lot* easier in some cases.
5780 *a lot* easier in some cases.
5771
5781
5772 * Simplified the prefilter code a bit. Now all handlers are
5782 * Simplified the prefilter code a bit. Now all handlers are
5773 expected to explicitly return a value (at least a blank string).
5783 expected to explicitly return a value (at least a blank string).
5774
5784
5775 * Heavy edits in ipplib. Removed the help system altogether. Now
5785 * Heavy edits in ipplib. Removed the help system altogether. Now
5776 obj?/?? is used for inspecting objects, a magic @doc prints
5786 obj?/?? is used for inspecting objects, a magic @doc prints
5777 docstrings, and full-blown Python help is accessed via the 'help'
5787 docstrings, and full-blown Python help is accessed via the 'help'
5778 keyword. This cleans up a lot of code (less to maintain) and does
5788 keyword. This cleans up a lot of code (less to maintain) and does
5779 the job. Since 'help' is now a standard Python component, might as
5789 the job. Since 'help' is now a standard Python component, might as
5780 well use it and remove duplicate functionality.
5790 well use it and remove duplicate functionality.
5781
5791
5782 Also removed the option to use ipplib as a standalone program. By
5792 Also removed the option to use ipplib as a standalone program. By
5783 now it's too dependent on other parts of IPython to function alone.
5793 now it's too dependent on other parts of IPython to function alone.
5784
5794
5785 * Fixed bug in genutils.pager. It would crash if the pager was
5795 * Fixed bug in genutils.pager. It would crash if the pager was
5786 exited immediately after opening (broken pipe).
5796 exited immediately after opening (broken pipe).
5787
5797
5788 * Trimmed down the VerboseTB reporting a little. The header is
5798 * Trimmed down the VerboseTB reporting a little. The header is
5789 much shorter now and the repeated exception arguments at the end
5799 much shorter now and the repeated exception arguments at the end
5790 have been removed. For interactive use the old header seemed a bit
5800 have been removed. For interactive use the old header seemed a bit
5791 excessive.
5801 excessive.
5792
5802
5793 * Fixed small bug in output of @whos for variables with multi-word
5803 * Fixed small bug in output of @whos for variables with multi-word
5794 types (only first word was displayed).
5804 types (only first word was displayed).
5795
5805
5796 2001-11-17 Fernando Perez <fperez@colorado.edu>
5806 2001-11-17 Fernando Perez <fperez@colorado.edu>
5797
5807
5798 * Version 0.1.10 released, 0.1.11 opened for further work.
5808 * Version 0.1.10 released, 0.1.11 opened for further work.
5799
5809
5800 * Modified dirs and friends. dirs now *returns* the stack (not
5810 * Modified dirs and friends. dirs now *returns* the stack (not
5801 prints), so one can manipulate it as a variable. Convenient to
5811 prints), so one can manipulate it as a variable. Convenient to
5802 travel along many directories.
5812 travel along many directories.
5803
5813
5804 * Fixed bug in magic_pdef: would only work with functions with
5814 * Fixed bug in magic_pdef: would only work with functions with
5805 arguments with default values.
5815 arguments with default values.
5806
5816
5807 2001-11-14 Fernando Perez <fperez@colorado.edu>
5817 2001-11-14 Fernando Perez <fperez@colorado.edu>
5808
5818
5809 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5819 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5810 example with IPython. Various other minor fixes and cleanups.
5820 example with IPython. Various other minor fixes and cleanups.
5811
5821
5812 * Version 0.1.9 released, 0.1.10 opened for further work.
5822 * Version 0.1.9 released, 0.1.10 opened for further work.
5813
5823
5814 * Added sys.path to the list of directories searched in the
5824 * Added sys.path to the list of directories searched in the
5815 execfile= option. It used to be the current directory and the
5825 execfile= option. It used to be the current directory and the
5816 user's IPYTHONDIR only.
5826 user's IPYTHONDIR only.
5817
5827
5818 2001-11-13 Fernando Perez <fperez@colorado.edu>
5828 2001-11-13 Fernando Perez <fperez@colorado.edu>
5819
5829
5820 * Reinstated the raw_input/prefilter separation that Janko had
5830 * Reinstated the raw_input/prefilter separation that Janko had
5821 initially. This gives a more convenient setup for extending the
5831 initially. This gives a more convenient setup for extending the
5822 pre-processor from the outside: raw_input always gets a string,
5832 pre-processor from the outside: raw_input always gets a string,
5823 and prefilter has to process it. We can then redefine prefilter
5833 and prefilter has to process it. We can then redefine prefilter
5824 from the outside and implement extensions for special
5834 from the outside and implement extensions for special
5825 purposes.
5835 purposes.
5826
5836
5827 Today I got one for inputting PhysicalQuantity objects
5837 Today I got one for inputting PhysicalQuantity objects
5828 (from Scientific) without needing any function calls at
5838 (from Scientific) without needing any function calls at
5829 all. Extremely convenient, and it's all done as a user-level
5839 all. Extremely convenient, and it's all done as a user-level
5830 extension (no IPython code was touched). Now instead of:
5840 extension (no IPython code was touched). Now instead of:
5831 a = PhysicalQuantity(4.2,'m/s**2')
5841 a = PhysicalQuantity(4.2,'m/s**2')
5832 one can simply say
5842 one can simply say
5833 a = 4.2 m/s**2
5843 a = 4.2 m/s**2
5834 or even
5844 or even
5835 a = 4.2 m/s^2
5845 a = 4.2 m/s^2
5836
5846
5837 I use this, but it's also a proof of concept: IPython really is
5847 I use this, but it's also a proof of concept: IPython really is
5838 fully user-extensible, even at the level of the parsing of the
5848 fully user-extensible, even at the level of the parsing of the
5839 command line. It's not trivial, but it's perfectly doable.
5849 command line. It's not trivial, but it's perfectly doable.
5840
5850
5841 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5851 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5842 the problem of modules being loaded in the inverse order in which
5852 the problem of modules being loaded in the inverse order in which
5843 they were defined in
5853 they were defined in
5844
5854
5845 * Version 0.1.8 released, 0.1.9 opened for further work.
5855 * Version 0.1.8 released, 0.1.9 opened for further work.
5846
5856
5847 * Added magics pdef, source and file. They respectively show the
5857 * Added magics pdef, source and file. They respectively show the
5848 definition line ('prototype' in C), source code and full python
5858 definition line ('prototype' in C), source code and full python
5849 file for any callable object. The object inspector oinfo uses
5859 file for any callable object. The object inspector oinfo uses
5850 these to show the same information.
5860 these to show the same information.
5851
5861
5852 * Version 0.1.7 released, 0.1.8 opened for further work.
5862 * Version 0.1.7 released, 0.1.8 opened for further work.
5853
5863
5854 * Separated all the magic functions into a class called Magic. The
5864 * Separated all the magic functions into a class called Magic. The
5855 InteractiveShell class was becoming too big for Xemacs to handle
5865 InteractiveShell class was becoming too big for Xemacs to handle
5856 (de-indenting a line would lock it up for 10 seconds while it
5866 (de-indenting a line would lock it up for 10 seconds while it
5857 backtracked on the whole class!)
5867 backtracked on the whole class!)
5858
5868
5859 FIXME: didn't work. It can be done, but right now namespaces are
5869 FIXME: didn't work. It can be done, but right now namespaces are
5860 all messed up. Do it later (reverted it for now, so at least
5870 all messed up. Do it later (reverted it for now, so at least
5861 everything works as before).
5871 everything works as before).
5862
5872
5863 * Got the object introspection system (magic_oinfo) working! I
5873 * Got the object introspection system (magic_oinfo) working! I
5864 think this is pretty much ready for release to Janko, so he can
5874 think this is pretty much ready for release to Janko, so he can
5865 test it for a while and then announce it. Pretty much 100% of what
5875 test it for a while and then announce it. Pretty much 100% of what
5866 I wanted for the 'phase 1' release is ready. Happy, tired.
5876 I wanted for the 'phase 1' release is ready. Happy, tired.
5867
5877
5868 2001-11-12 Fernando Perez <fperez@colorado.edu>
5878 2001-11-12 Fernando Perez <fperez@colorado.edu>
5869
5879
5870 * Version 0.1.6 released, 0.1.7 opened for further work.
5880 * Version 0.1.6 released, 0.1.7 opened for further work.
5871
5881
5872 * Fixed bug in printing: it used to test for truth before
5882 * Fixed bug in printing: it used to test for truth before
5873 printing, so 0 wouldn't print. Now checks for None.
5883 printing, so 0 wouldn't print. Now checks for None.
5874
5884
5875 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5885 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5876 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5886 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5877 reaches by hand into the outputcache. Think of a better way to do
5887 reaches by hand into the outputcache. Think of a better way to do
5878 this later.
5888 this later.
5879
5889
5880 * Various small fixes thanks to Nathan's comments.
5890 * Various small fixes thanks to Nathan's comments.
5881
5891
5882 * Changed magic_pprint to magic_Pprint. This way it doesn't
5892 * Changed magic_pprint to magic_Pprint. This way it doesn't
5883 collide with pprint() and the name is consistent with the command
5893 collide with pprint() and the name is consistent with the command
5884 line option.
5894 line option.
5885
5895
5886 * Changed prompt counter behavior to be fully like
5896 * Changed prompt counter behavior to be fully like
5887 Mathematica's. That is, even input that doesn't return a result
5897 Mathematica's. That is, even input that doesn't return a result
5888 raises the prompt counter. The old behavior was kind of confusing
5898 raises the prompt counter. The old behavior was kind of confusing
5889 (getting the same prompt number several times if the operation
5899 (getting the same prompt number several times if the operation
5890 didn't return a result).
5900 didn't return a result).
5891
5901
5892 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5902 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5893
5903
5894 * Fixed -Classic mode (wasn't working anymore).
5904 * Fixed -Classic mode (wasn't working anymore).
5895
5905
5896 * Added colored prompts using Nathan's new code. Colors are
5906 * Added colored prompts using Nathan's new code. Colors are
5897 currently hardwired, they can be user-configurable. For
5907 currently hardwired, they can be user-configurable. For
5898 developers, they can be chosen in file ipythonlib.py, at the
5908 developers, they can be chosen in file ipythonlib.py, at the
5899 beginning of the CachedOutput class def.
5909 beginning of the CachedOutput class def.
5900
5910
5901 2001-11-11 Fernando Perez <fperez@colorado.edu>
5911 2001-11-11 Fernando Perez <fperez@colorado.edu>
5902
5912
5903 * Version 0.1.5 released, 0.1.6 opened for further work.
5913 * Version 0.1.5 released, 0.1.6 opened for further work.
5904
5914
5905 * Changed magic_env to *return* the environment as a dict (not to
5915 * Changed magic_env to *return* the environment as a dict (not to
5906 print it). This way it prints, but it can also be processed.
5916 print it). This way it prints, but it can also be processed.
5907
5917
5908 * Added Verbose exception reporting to interactive
5918 * Added Verbose exception reporting to interactive
5909 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5919 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5910 traceback. Had to make some changes to the ultraTB file. This is
5920 traceback. Had to make some changes to the ultraTB file. This is
5911 probably the last 'big' thing in my mental todo list. This ties
5921 probably the last 'big' thing in my mental todo list. This ties
5912 in with the next entry:
5922 in with the next entry:
5913
5923
5914 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5924 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5915 has to specify is Plain, Color or Verbose for all exception
5925 has to specify is Plain, Color or Verbose for all exception
5916 handling.
5926 handling.
5917
5927
5918 * Removed ShellServices option. All this can really be done via
5928 * Removed ShellServices option. All this can really be done via
5919 the magic system. It's easier to extend, cleaner and has automatic
5929 the magic system. It's easier to extend, cleaner and has automatic
5920 namespace protection and documentation.
5930 namespace protection and documentation.
5921
5931
5922 2001-11-09 Fernando Perez <fperez@colorado.edu>
5932 2001-11-09 Fernando Perez <fperez@colorado.edu>
5923
5933
5924 * Fixed bug in output cache flushing (missing parameter to
5934 * Fixed bug in output cache flushing (missing parameter to
5925 __init__). Other small bugs fixed (found using pychecker).
5935 __init__). Other small bugs fixed (found using pychecker).
5926
5936
5927 * Version 0.1.4 opened for bugfixing.
5937 * Version 0.1.4 opened for bugfixing.
5928
5938
5929 2001-11-07 Fernando Perez <fperez@colorado.edu>
5939 2001-11-07 Fernando Perez <fperez@colorado.edu>
5930
5940
5931 * Version 0.1.3 released, mainly because of the raw_input bug.
5941 * Version 0.1.3 released, mainly because of the raw_input bug.
5932
5942
5933 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5943 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5934 and when testing for whether things were callable, a call could
5944 and when testing for whether things were callable, a call could
5935 actually be made to certain functions. They would get called again
5945 actually be made to certain functions. They would get called again
5936 once 'really' executed, with a resulting double call. A disaster
5946 once 'really' executed, with a resulting double call. A disaster
5937 in many cases (list.reverse() would never work!).
5947 in many cases (list.reverse() would never work!).
5938
5948
5939 * Removed prefilter() function, moved its code to raw_input (which
5949 * Removed prefilter() function, moved its code to raw_input (which
5940 after all was just a near-empty caller for prefilter). This saves
5950 after all was just a near-empty caller for prefilter). This saves
5941 a function call on every prompt, and simplifies the class a tiny bit.
5951 a function call on every prompt, and simplifies the class a tiny bit.
5942
5952
5943 * Fix _ip to __ip name in magic example file.
5953 * Fix _ip to __ip name in magic example file.
5944
5954
5945 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5955 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5946 work with non-gnu versions of tar.
5956 work with non-gnu versions of tar.
5947
5957
5948 2001-11-06 Fernando Perez <fperez@colorado.edu>
5958 2001-11-06 Fernando Perez <fperez@colorado.edu>
5949
5959
5950 * Version 0.1.2. Just to keep track of the recent changes.
5960 * Version 0.1.2. Just to keep track of the recent changes.
5951
5961
5952 * Fixed nasty bug in output prompt routine. It used to check 'if
5962 * Fixed nasty bug in output prompt routine. It used to check 'if
5953 arg != None...'. Problem is, this fails if arg implements a
5963 arg != None...'. Problem is, this fails if arg implements a
5954 special comparison (__cmp__) which disallows comparing to
5964 special comparison (__cmp__) which disallows comparing to
5955 None. Found it when trying to use the PhysicalQuantity module from
5965 None. Found it when trying to use the PhysicalQuantity module from
5956 ScientificPython.
5966 ScientificPython.
5957
5967
5958 2001-11-05 Fernando Perez <fperez@colorado.edu>
5968 2001-11-05 Fernando Perez <fperez@colorado.edu>
5959
5969
5960 * Also added dirs. Now the pushd/popd/dirs family functions
5970 * Also added dirs. Now the pushd/popd/dirs family functions
5961 basically like the shell, with the added convenience of going home
5971 basically like the shell, with the added convenience of going home
5962 when called with no args.
5972 when called with no args.
5963
5973
5964 * pushd/popd slightly modified to mimic shell behavior more
5974 * pushd/popd slightly modified to mimic shell behavior more
5965 closely.
5975 closely.
5966
5976
5967 * Added env,pushd,popd from ShellServices as magic functions. I
5977 * Added env,pushd,popd from ShellServices as magic functions. I
5968 think the cleanest will be to port all desired functions from
5978 think the cleanest will be to port all desired functions from
5969 ShellServices as magics and remove ShellServices altogether. This
5979 ShellServices as magics and remove ShellServices altogether. This
5970 will provide a single, clean way of adding functionality
5980 will provide a single, clean way of adding functionality
5971 (shell-type or otherwise) to IP.
5981 (shell-type or otherwise) to IP.
5972
5982
5973 2001-11-04 Fernando Perez <fperez@colorado.edu>
5983 2001-11-04 Fernando Perez <fperez@colorado.edu>
5974
5984
5975 * Added .ipython/ directory to sys.path. This way users can keep
5985 * Added .ipython/ directory to sys.path. This way users can keep
5976 customizations there and access them via import.
5986 customizations there and access them via import.
5977
5987
5978 2001-11-03 Fernando Perez <fperez@colorado.edu>
5988 2001-11-03 Fernando Perez <fperez@colorado.edu>
5979
5989
5980 * Opened version 0.1.1 for new changes.
5990 * Opened version 0.1.1 for new changes.
5981
5991
5982 * Changed version number to 0.1.0: first 'public' release, sent to
5992 * Changed version number to 0.1.0: first 'public' release, sent to
5983 Nathan and Janko.
5993 Nathan and Janko.
5984
5994
5985 * Lots of small fixes and tweaks.
5995 * Lots of small fixes and tweaks.
5986
5996
5987 * Minor changes to whos format. Now strings are shown, snipped if
5997 * Minor changes to whos format. Now strings are shown, snipped if
5988 too long.
5998 too long.
5989
5999
5990 * Changed ShellServices to work on __main__ so they show up in @who
6000 * Changed ShellServices to work on __main__ so they show up in @who
5991
6001
5992 * Help also works with ? at the end of a line:
6002 * Help also works with ? at the end of a line:
5993 ?sin and sin?
6003 ?sin and sin?
5994 both produce the same effect. This is nice, as often I use the
6004 both produce the same effect. This is nice, as often I use the
5995 tab-complete to find the name of a method, but I used to then have
6005 tab-complete to find the name of a method, but I used to then have
5996 to go to the beginning of the line to put a ? if I wanted more
6006 to go to the beginning of the line to put a ? if I wanted more
5997 info. Now I can just add the ? and hit return. Convenient.
6007 info. Now I can just add the ? and hit return. Convenient.
5998
6008
5999 2001-11-02 Fernando Perez <fperez@colorado.edu>
6009 2001-11-02 Fernando Perez <fperez@colorado.edu>
6000
6010
6001 * Python version check (>=2.1) added.
6011 * Python version check (>=2.1) added.
6002
6012
6003 * Added LazyPython documentation. At this point the docs are quite
6013 * Added LazyPython documentation. At this point the docs are quite
6004 a mess. A cleanup is in order.
6014 a mess. A cleanup is in order.
6005
6015
6006 * Auto-installer created. For some bizarre reason, the zipfiles
6016 * Auto-installer created. For some bizarre reason, the zipfiles
6007 module isn't working on my system. So I made a tar version
6017 module isn't working on my system. So I made a tar version
6008 (hopefully the command line options in various systems won't kill
6018 (hopefully the command line options in various systems won't kill
6009 me).
6019 me).
6010
6020
6011 * Fixes to Struct in genutils. Now all dictionary-like methods are
6021 * Fixes to Struct in genutils. Now all dictionary-like methods are
6012 protected (reasonably).
6022 protected (reasonably).
6013
6023
6014 * Added pager function to genutils and changed ? to print usage
6024 * Added pager function to genutils and changed ? to print usage
6015 note through it (it was too long).
6025 note through it (it was too long).
6016
6026
6017 * Added the LazyPython functionality. Works great! I changed the
6027 * Added the LazyPython functionality. Works great! I changed the
6018 auto-quote escape to ';', it's on home row and next to '. But
6028 auto-quote escape to ';', it's on home row and next to '. But
6019 both auto-quote and auto-paren (still /) escapes are command-line
6029 both auto-quote and auto-paren (still /) escapes are command-line
6020 parameters.
6030 parameters.
6021
6031
6022
6032
6023 2001-11-01 Fernando Perez <fperez@colorado.edu>
6033 2001-11-01 Fernando Perez <fperez@colorado.edu>
6024
6034
6025 * Version changed to 0.0.7. Fairly large change: configuration now
6035 * Version changed to 0.0.7. Fairly large change: configuration now
6026 is all stored in a directory, by default .ipython. There, all
6036 is all stored in a directory, by default .ipython. There, all
6027 config files have normal looking names (not .names)
6037 config files have normal looking names (not .names)
6028
6038
6029 * Version 0.0.6 Released first to Lucas and Archie as a test
6039 * Version 0.0.6 Released first to Lucas and Archie as a test
6030 run. Since it's the first 'semi-public' release, change version to
6040 run. Since it's the first 'semi-public' release, change version to
6031 > 0.0.6 for any changes now.
6041 > 0.0.6 for any changes now.
6032
6042
6033 * Stuff I had put in the ipplib.py changelog:
6043 * Stuff I had put in the ipplib.py changelog:
6034
6044
6035 Changes to InteractiveShell:
6045 Changes to InteractiveShell:
6036
6046
6037 - Made the usage message a parameter.
6047 - Made the usage message a parameter.
6038
6048
6039 - Require the name of the shell variable to be given. It's a bit
6049 - Require the name of the shell variable to be given. It's a bit
6040 of a hack, but allows the name 'shell' not to be hardwired in the
6050 of a hack, but allows the name 'shell' not to be hardwired in the
6041 magic (@) handler, which is problematic b/c it requires
6051 magic (@) handler, which is problematic b/c it requires
6042 polluting the global namespace with 'shell'. This in turn is
6052 polluting the global namespace with 'shell'. This in turn is
6043 fragile: if a user redefines a variable called shell, things
6053 fragile: if a user redefines a variable called shell, things
6044 break.
6054 break.
6045
6055
6046 - magic @: all functions available through @ need to be defined
6056 - magic @: all functions available through @ need to be defined
6047 as magic_<name>, even though they can be called simply as
6057 as magic_<name>, even though they can be called simply as
6048 @<name>. This allows the special command @magic to gather
6058 @<name>. This allows the special command @magic to gather
6049 information automatically about all existing magic functions,
6059 information automatically about all existing magic functions,
6050 even if they are run-time user extensions, by parsing the shell
6060 even if they are run-time user extensions, by parsing the shell
6051 instance __dict__ looking for special magic_ names.
6061 instance __dict__ looking for special magic_ names.
6052
6062
6053 - mainloop: added *two* local namespace parameters. This allows
6063 - mainloop: added *two* local namespace parameters. This allows
6054 the class to differentiate between parameters which were there
6064 the class to differentiate between parameters which were there
6055 before and after command line initialization was processed. This
6065 before and after command line initialization was processed. This
6056 way, later @who can show things loaded at startup by the
6066 way, later @who can show things loaded at startup by the
6057 user. This trick was necessary to make session saving/reloading
6067 user. This trick was necessary to make session saving/reloading
6058 really work: ideally after saving/exiting/reloading a session,
6068 really work: ideally after saving/exiting/reloading a session,
6059 *everything* should look the same, including the output of @who. I
6069 *everything* should look the same, including the output of @who. I
6060 was only able to make this work with this double namespace
6070 was only able to make this work with this double namespace
6061 trick.
6071 trick.
6062
6072
6063 - added a header to the logfile which allows (almost) full
6073 - added a header to the logfile which allows (almost) full
6064 session restoring.
6074 session restoring.
6065
6075
6066 - prepend lines beginning with @ or !, with a and log
6076 - prepend lines beginning with @ or !, with a and log
6067 them. Why? !lines: may be useful to know what you did @lines:
6077 them. Why? !lines: may be useful to know what you did @lines:
6068 they may affect session state. So when restoring a session, at
6078 they may affect session state. So when restoring a session, at
6069 least inform the user of their presence. I couldn't quite get
6079 least inform the user of their presence. I couldn't quite get
6070 them to properly re-execute, but at least the user is warned.
6080 them to properly re-execute, but at least the user is warned.
6071
6081
6072 * Started ChangeLog.
6082 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now