Show More
@@ -32,7 +32,7 b' from IPython.core.profiledir import ProfileDir' | |||
|
32 | 32 | from IPython.utils.importstring import import_item |
|
33 | 33 | from IPython.paths import get_ipython_dir, get_ipython_package_dir |
|
34 | 34 | from IPython.utils import py3compat |
|
35 | from traitlets import Unicode, Bool, Dict | |
|
35 | from traitlets import Unicode, Bool, Dict, observe | |
|
36 | 36 | |
|
37 | 37 | #----------------------------------------------------------------------------- |
|
38 | 38 | # Constants |
@@ -149,14 +149,14 b' class ProfileList(Application):' | |||
|
149 | 149 | ) |
|
150 | 150 | )) |
|
151 | 151 | |
|
152 |
ipython_dir = Unicode(get_ipython_dir(), |
|
|
152 | ipython_dir = Unicode(get_ipython_dir(), | |
|
153 | 153 | help=""" |
|
154 | 154 | The name of the IPython directory. This directory is used for logging |
|
155 | 155 | configuration (through profiles), history storage, etc. The default |
|
156 | 156 | is usually $HOME/.ipython. This options can also be specified through |
|
157 | 157 | the environment variable IPYTHONDIR. |
|
158 | 158 | """ |
|
159 | ) | |
|
159 | ).tag(config=True) | |
|
160 | 160 | |
|
161 | 161 | |
|
162 | 162 | def _print_profiles(self, profiles): |
@@ -211,15 +211,18 b' class ProfileCreate(BaseIPythonApplication):' | |||
|
211 | 211 | name = u'ipython-profile' |
|
212 | 212 | description = create_help |
|
213 | 213 | examples = _create_examples |
|
214 |
auto_create = Bool(True |
|
|
214 | auto_create = Bool(True) | |
|
215 | 215 | def _log_format_default(self): |
|
216 | 216 | return "[%(name)s] %(message)s" |
|
217 | 217 | |
|
218 | 218 | def _copy_config_files_default(self): |
|
219 | 219 | return True |
|
220 | 220 | |
|
221 |
parallel = Bool(False, |
|
|
222 |
help="whether to include parallel computing config files" |
|
|
221 | parallel = Bool(False, | |
|
222 | help="whether to include parallel computing config files" | |
|
223 | ).tag(config=True) | |
|
224 | ||
|
225 | @observe('parallel') | |
|
223 | 226 | def _parallel_changed(self, name, old, new): |
|
224 | 227 | parallel_files = [ 'ipcontroller_config.py', |
|
225 | 228 | 'ipengine_config.py', |
@@ -285,6 +285,7 b' class PromptManager(Configurable):' | |||
|
285 | 285 | |
|
286 | 286 | # The number of characters in each prompt which don't contribute to width |
|
287 | 287 | invisible_chars = Dict() |
|
288 | ||
|
288 | 289 | @default('invisible_chars') |
|
289 | 290 | def _invisible_chars_default(self): |
|
290 | 291 | return {'in': 0, 'in2': 0, 'out': 0, 'rewrite':0} |
@@ -321,7 +322,9 b' class PromptManager(Configurable):' | |||
|
321 | 322 | invis_chars = _invisible_characters(self._render(name, color=True)) |
|
322 | 323 | self.invisible_chars[name] = invis_chars |
|
323 | 324 | |
|
324 |
def _update_prompt_trait(self, |
|
|
325 | def _update_prompt_trait(self, changes): | |
|
326 | traitname = changes['name'] | |
|
327 | new_template = changes['new'] | |
|
325 | 328 | name = traitname[:-9] # Cut off '_template' |
|
326 | 329 | self.update_prompt(name, new_template) |
|
327 | 330 |
General Comments 0
You need to be logged in to leave comments.
Login now