##// END OF EJS Templates
One more getters fix...
fperez -
Show More
@@ -1,60 +1,59 b''
1 """ Set default options for IPython.
1 """ Set default options for IPython.
2
2
3 Just import this module to get reasonable defaults for everything.
3 Just import this module to get reasonable defaults for everything.
4
4
5 These configurations used to be performed in ipythonrc (or ipythonrc.ini).
5 These configurations used to be performed in ipythonrc (or ipythonrc.ini).
6 Therefore importing this in your config files makes ipython basically
6 Therefore importing this in your config files makes ipython basically
7 ignore your ipythonrc. This is *not* imported by default, you need to import
7 ignore your ipythonrc. This is *not* imported by default, you need to import
8 this manually in one of your config files.
8 this manually in one of your config files.
9
9
10 You can further override these defaults in e.g. your ipy_user_config.py,
10 You can further override these defaults in e.g. your ipy_user_config.py,
11 ipy_profile_PROFILENAME etc.
11 ipy_profile_PROFILENAME etc.
12
12
13 """
13 """
14
14
15 import IPython.rlineimpl as readline
15 import IPython.rlineimpl as readline
16 import IPython.ipapi
16 import IPython.ipapi
17 ip = IPython.ipapi.get()
17 ip = IPython.ipapi.get()
18
18
19 o = ip.options()
19 o = ip.options
20
21
20
22 o.colors = "Linux"
21 o.colors = "Linux"
23 o.color_info=1
22 o.color_info=1
24 o.confirm_exit=1
23 o.confirm_exit=1
25 o.pprint=1
24 o.pprint=1
26 o.multi_line_specials=1
25 o.multi_line_specials=1
27 o.xmode="Context"
26 o.xmode="Context"
28
27
29
28
30 o.prompt_in1='In [\#]: '
29 o.prompt_in1='In [\#]: '
31 o.prompt_in2 =' .\D.: '
30 o.prompt_in2 =' .\D.: '
32 o.prompt_out = 'Out[\#]: '
31 o.prompt_out = 'Out[\#]: '
33 o.prompts_pad_left=1
32 o.prompts_pad_left=1
34
33
35 o.readline_remove_delims="-/~"
34 o.readline_remove_delims="-/~"
36 o.readline_merge_completions=1
35 o.readline_merge_completions=1
37
36
38 o.readline = 1
37 o.readline = 1
39
38
40 rlopts = """\
39 rlopts = """\
41 tab: complete
40 tab: complete
42 "\C-l": possible-completions
41 "\C-l": possible-completions
43 set show-all-if-ambiguous on
42 set show-all-if-ambiguous on
44 "\C-o": tab-insert
43 "\C-o": tab-insert
45 "\M-i": " "
44 "\M-i": " "
46 "\M-o": "\d\d\d\d"
45 "\M-o": "\d\d\d\d"
47 "\M-I": "\d\d\d\d"
46 "\M-I": "\d\d\d\d"
48 "\C-r": reverse-search-history
47 "\C-r": reverse-search-history
49 "\C-s": forward-search-history
48 "\C-s": forward-search-history
50 "\C-p": history-search-backward
49 "\C-p": history-search-backward
51 "\C-n": history-search-forward
50 "\C-n": history-search-forward
52 "\e[A": history-search-backward
51 "\e[A": history-search-backward
53 "\e[B": history-search-forward
52 "\e[B": history-search-forward
54 "\C-k": kill-line
53 "\C-k": kill-line
55 "\C-u": unix-line-discard"""
54 "\C-u": unix-line-discard"""
56
55
57 for cmd in rlopts.split('\n'):
56 for cmd in rlopts.split('\n'):
58 readline.parse_and_bind(cmd)
57 readline.parse_and_bind(cmd)
59
58
60
59
General Comments 0
You need to be logged in to leave comments. Login now