The TraitTypes returned don’t know anything about the values
that the various HasTrait’s instances are holding.

This follows the same algorithm as traits does and does not allow
for any simple way of specifying merely that a metadata name
exists, but has any value. This is because get_metadata returns
None if a metadata key doesn’t exist.

End of line range (excluded from output itself). If None, retrieve
to the end of the session.

raw : bool

If True, return untranslated input

output : bool

If True, attempt to include output. This will be ‘real’ Python
objects for the current session, or text reprs from previous
sessions if db_log_output was enabled at the time. Where no output
is found, None is used.

Static handlers can be created by creating methods on a HasTraits
subclass with the naming convention ‘_[traitname]_changed’. Thus,
to create static handler for the trait ‘a’, create the method
_a_changed(self, name, old, new) (fewer arguments can be used, see
below).

Parameters :

handler : callable

A callable that is called when a trait changes. Its
signature can be handler(), handler(name), handler(name, new)
or handler(name, old, new).

name : list, str, None

If None, the handler will apply to all traits. If a list
of str, handler will apply to all names in the list. If a
str, the handler will apply just to that name.

remove : bool

If False (the default), then install the handler. If True
then unintall it.

The TraitTypes returned don’t know anything about the values
that the various HasTrait’s instances are holding.

This follows the same algorithm as traits does and does not allow
for any simple way of specifying merely that a metadata name
exists, but has any value. This is because get_metadata returns
None if a metadata key doesn’t exist.

The TraitTypes returned don’t know anything about the values
that the various HasTrait’s instances are holding.

This follows the same algorithm as traits does and does not allow
for any simple way of specifying merely that a metadata name
exists, but has any value. This is because get_metadata returns
None if a metadata key doesn’t exist.

Session number to retrieve. The current session is 0, and negative
numbers count back from current session, so -1 is previous session.

start : int

First line to retrieve.

stop : int

End of line range (excluded from output itself). If None, retrieve
to the end of the session.

raw : bool

If True, return untranslated input

output : bool

If True, attempt to include output. This will be ‘real’ Python
objects for the current session, or text reprs from previous
sessions if db_log_output was enabled at the time. Where no output
is found, None is used.

Static handlers can be created by creating methods on a HasTraits
subclass with the naming convention ‘_[traitname]_changed’. Thus,
to create static handler for the trait ‘a’, create the method
_a_changed(self, name, old, new) (fewer arguments can be used, see
below).

Parameters :

handler : callable

A callable that is called when a trait changes. Its
signature can be handler(), handler(name), handler(name, new)
or handler(name, old, new).

name : list, str, None

If None, the handler will apply to all traits. If a list
of str, handler will apply to all names in the list. If a
str, the handler will apply just to that name.

remove : bool

If False (the default), then install the handler. If True
then unintall it.

The TraitTypes returned don’t know anything about the values
that the various HasTrait’s instances are holding.

This follows the same algorithm as traits does and does not allow
for any simple way of specifying merely that a metadata name
exists, but has any value. This is because get_metadata returns
None if a metadata key doesn’t exist.