These are chat archives for ipython/ipython
pip install --upgrade terminadoand try again. If it persists, make sure that you have Tornado 4.
foo = Bool(True, config=True)
kernel_manager_classand other to see how they work.
yep, you do as
kls = import_item(self.contents_manager_class) self.contents_manager = kls(parent=self, log=self.log)
but for the kernelspec manager.
class .... kernel_spec_manager_class = DottedObjectName('IPython.xxx.xxxx', config=True, help='...') kls = import_item(self.kernel_spec_manager_class) self.kernel_spec_manager = kls(parent=self, log=self.log)
Notebookapp.kernel_spec_manager_class = 'MyPackage.MyManager'
Instancetrait and it will do the importing and instantiating logic you described above
Typemade an interestingly different error
Typeexists to do more or less what it sounds like you want to do; namely, resolve a string into a class at runtime
I have a question of scope: I have locally modified
dlink to be
safe, meaning that assignment is protected by try / catch statements.
link and dlink take two additional optional named arguments,
success (a tuple (hasTrait instance, name)) and
message (another tuple (hasTrait instance, name)).
In the case when a TraitError occurs (failed validation), success.v is set to False and message.v is set to the TraitError message. In case of success, the message is set to an empty string and the success to True. This is especially convenient when you want to validate a user input on the fly and use the traitlet validation mechanism to do that. (And notify the user via another widget for example).
Would it make sense to modify the corresponding upstream functions to be that way?