Inherits from
- CallableComponent: enthought.component.callable_component.CallableComponent
Attributes
- code
The component's code.
code = Property
- END_MAGIC
END_MAGIC = """#### </enthought> #### """
- id
The component id.
id = Property
- path
The path to the script that we are componentizing.
path = Str()
- START_MAGIC
The text that marks the start of the XML component description.
START_MAGIC = """#### <enthought version='1.0'> #### """
- traits_view
Define the View to use:
traits_view = View(Group(Group(Group(Item('code', editor = CodeEditor(key_bindings = key_bindings), width = 720, has_focus = True), label = 'Code', export = 'DockShellWindow', show_labels = False), Group(Group(Item('inputs', style = 'custom', id = 'inputs_element', editor = input_editor, height = 200), show_labels = False, export = 'DockShellWindow', orientation = 'vertical', label = 'Inputs'), Group(Item('outputs', style = 'custom', id = 'outputs_element', editor = output_editor, height = 200), show_labels = False, label = 'Outputs', export = 'DockShellWindow', orientation = 'vertical'), Group(Item('name'), Item('description'), Group(Item('_metadata_list', editor = InstanceEditor(), style = 'custom'), show_labels = False, label = 'Metadata', show_border = True), label = 'General', export = 'DockShellWindow'), layout = 'tabbed'), id = 'splitter1', orientation = 'vertical', layout = 'split')), id = 'enthought.component.script_component.editor', kind = 'live', dock = 'tab', buttons = [ Action(name = 'Save'), Action(name = 'Save and Run', action = '_save_and_run_clicked'), Action(name = 'Refresh'), Action(name = 'Help ', action = '_help_clicked'), Action(name = 'Close ', action = '_cancel_clicked') ], resizable = True, handler = ScriptComponentHandler(), help_id = 'enlib|HID_Script_Editing_Wnd')
Inherited from base classes
Method summary
- __call__(self, *args, **kw)
- invoke(self, namespace)
- refresh(self)
- unregister(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __init__(self, **kw)
- __prefix_trait__(self, name)
- __reduce_ex__(self, protocol)
- __setstate__(self, state)
- __str__(self)
- 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)
- get(self, *names, **metadata)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same')
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set(self, trait_change_notify = True, **traits)
- 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_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- 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
- __call__(self, *args, **kw)
Calls the component like a regular Python function.
- invoke(self, namespace)
Invokes (runs) the component in the specified namespace.
- refresh(self)
Refreshes the code of this component from the file system.
- unregister(self)
Removes this component from the registry.