Show More
@@ -1,7 +1,7 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Magic functions for InteractiveShell. |
|
2 | """Magic functions for InteractiveShell. | |
3 |
|
3 | |||
4 |
$Id: Magic.py 135 |
|
4 | $Id: Magic.py 1355 2006-06-07 16:56:50Z vivainio $""" | |
5 |
|
5 | |||
6 | #***************************************************************************** |
|
6 | #***************************************************************************** | |
7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
|
7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and | |
@@ -973,9 +973,9 b' Currently the magic system has the following functions:\\n"""' | |||||
973 |
|
973 | |||
974 | Input/Output history are left around in case you need them.""" |
|
974 | Input/Output history are left around in case you need them.""" | |
975 |
|
975 | |||
976 |
ans = |
|
976 | ans = self.shell.ask_yes_no( | |
977 | "Once deleted, variables cannot be recovered. Proceed (y/n)? ") |
|
977 | "Once deleted, variables cannot be recovered. Proceed (y/[n])? ") | |
978 |
if not ans |
|
978 | if not ans: | |
979 | print 'Nothing done.' |
|
979 | print 'Nothing done.' | |
980 | return |
|
980 | return | |
981 | user_ns = self.shell.user_ns |
|
981 | user_ns = self.shell.user_ns |
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.' | |||||
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py 135 |
|
9 | $Id: iplib.py 1355 2006-06-07 16:56:50Z vivainio $ | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
@@ -1231,6 +1231,11 b' want to merge them back into the new files.""" % locals()' | |||||
1231 | # Configure auto-indent for all platforms |
|
1231 | # Configure auto-indent for all platforms | |
1232 | self.set_autoindent(self.rc.autoindent) |
|
1232 | self.set_autoindent(self.rc.autoindent) | |
1233 |
|
1233 | |||
|
1234 | def ask_yes_no(self,prompt,default=True): | |||
|
1235 | if self.rc.quiet: | |||
|
1236 | return True | |||
|
1237 | return ask_yes_no(prompt,default) | |||
|
1238 | ||||
1234 | def _should_recompile(self,e): |
|
1239 | def _should_recompile(self,e): | |
1235 | """Utility routine for edit_syntax_error""" |
|
1240 | """Utility routine for edit_syntax_error""" | |
1236 |
|
1241 | |||
@@ -1241,7 +1246,7 b' want to merge them back into the new files.""" % locals()' | |||||
1241 | return False |
|
1246 | return False | |
1242 | try: |
|
1247 | try: | |
1243 | if (self.rc.autoedit_syntax and |
|
1248 | if (self.rc.autoedit_syntax and | |
1244 | not ask_yes_no('Return to editor to correct syntax error? ' |
|
1249 | not self.ask_yes_no('Return to editor to correct syntax error? ' | |
1245 | '[Y/n] ','y')): |
|
1250 | '[Y/n] ','y')): | |
1246 | return False |
|
1251 | return False | |
1247 | except EOFError: |
|
1252 | except EOFError: | |
@@ -2207,7 +2212,7 b' want to merge them back into the new files.""" % locals()' | |||||
2207 | This method sets the exit_now attribute.""" |
|
2212 | This method sets the exit_now attribute.""" | |
2208 |
|
2213 | |||
2209 | if self.rc.confirm_exit: |
|
2214 | if self.rc.confirm_exit: | |
2210 | if ask_yes_no('Do you really want to exit ([y]/n)?','y'): |
|
2215 | if self.ask_yes_no('Do you really want to exit ([y]/n)?','y'): | |
2211 | self.exit_now = True |
|
2216 | self.exit_now = True | |
2212 | else: |
|
2217 | else: | |
2213 | self.exit_now = True |
|
2218 | self.exit_now = True |
@@ -6,7 +6,7 b' 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 13 |
|
9 | $Id: ipmaker.py 1355 2006-06-07 16:56:50Z 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> | |
@@ -208,6 +208,7 b" object? -> Details about 'object'. ?object also works, ?? prints more." | |||||
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 | quick = 0, |
|
212 | quick = 0, | |
212 | readline = 1, |
|
213 | readline = 1, | |
213 | readline_merge_completions = 1, |
|
214 | readline_merge_completions = 1, |
@@ -1,3 +1,9 b'' | |||||
|
1 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |||
|
2 | ||||
|
3 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): | |||
|
4 | Confirmation prompts can be supressed by 'quiet' option. | |||
|
5 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". | |||
|
6 | ||||
1 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
7 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
2 |
|
8 | |||
3 | * IPython/Release.py (version): Made 0.7.2 final for release. |
|
9 | * IPython/Release.py (version): Made 0.7.2 final for release. | |
@@ -6,10 +12,10 b'' | |||||
6 | 2006-06-05 Ville Vainio <vivainio@gmail.com> |
|
12 | 2006-06-05 Ville Vainio <vivainio@gmail.com> | |
7 |
|
13 | |||
8 | * Magic.py (magic_rehashx): Honor no_alias list earlier in |
|
14 | * Magic.py (magic_rehashx): Honor no_alias list earlier in | |
9 |
|
|
15 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py | |
10 |
|
16 | |||
11 |
|
|
17 | * upgrade_dir.py: try import 'path' module a bit harder | |
12 |
|
|
18 | (for %upgrade) | |
13 |
|
19 | |||
14 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
20 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
15 |
|
21 |
General Comments 0
You need to be logged in to leave comments.
Login now