Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- active_experiment
The active experiment for this project. This can be used by scripting methods on the project.
active_experiment = Property(Instance(Experiment), depends_on = [ '_active_exp_ndx', 'experiments', 'experiments_items' ])
- CONFIG_SPEC
This is the name of the ConfigObj specification file that defines the format and structure of saved project files.
CONFIG_SPEC = 'project_config_spec.txt'
- contexts
A list of contexts that are associated with the project
contexts = List(Instance(IListenableContext, adapt = 'yes', rich_compare = False))
- experiments
A list of the experiments in this project
experiments = List(Instance(Experiment))
- PROJECT_FILE_NAME
Since projects are represented/encapsulated by a directory (see project_save_path instance attribute), the actual ini-format save file inside that directory has to be given a name. Since there is no mechanism for a priori informing a project what that file is named, we settle on a convention to always name the project file the same.
PROJECT_FILE_NAME = 'project.txt'
- project_save_path
Name of directory where the project is saved out. Projects are always saved to their own directories.
project_save_path = Directory()
Inherited from base classes
Method summary
- add_context(self, context)
- add_experiment(self, experiment)
- find_context(self, name)
- find_experiment(self, name)
- from_dir(cls, dirname)
- load(self, dirname)
- remove_context(self, context)
- remove_experiment(self, experiment)
- save(self, dirname = '')
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, state, trait_change_notify = True)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- add_context(self, context)
Makes another context available to the project. (The active context must be one of the available contexts.)
- add_experiment(self, experiment)
Adds a new experiment to the project.
- find_context(self, name)
Returns the named context from the project's list of contexts. If it cannot be found, returns None.
- find_experiment(self, name)
Returns the name experiment from the project's list of experiments. If it cannot be found, returns None.
- from_dir(cls, dirname)
Constructs a new project instance from the given dirname. If no directory name is provided, returns None.
- load(self, dirname)
Loads the project from the given directory. The existing state of the project is completely modified.
- remove_context(self, context)
Removes the particular context from the list of available contexts
- remove_experiment(self, experiment)
Removes an experiment from the project. If this is the active experiment, then the active experiment is set to None.
- save(self, dirname = '')
Saves the project as a directory named dirname.
If dirname is not provided, the project_save_path attribute should already be set.
If project_save_path is not set, then it will be set to dirname.