parallel.apps.winhpcjob — IPython 0.11 documentation

### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# parallel.apps.winhpcjob

## Module: `parallel.apps.winhpcjob`

Inheritance diagram for `IPython.parallel.apps.winhpcjob`:

Job and task components for writing .xml files that the Windows HPC Server 2008 can use to start jobs.

Authors:

- Brian Granger
- MinRK

## Classes

### `IPControllerJob`

class `IPython.parallel.apps.winhpcjob.` `IPControllerJob`(**kwargs)

  Bases: `IPython.parallel.apps.winhpcjob.WinHPCJob`

  `__init__`(**kwargs)

    Create a configurable given a config config.

    Parameters : | config : Config If this is empty, default values are used. If config is a `Config` instance, it will be used to configure the instance.

    Notes

    Subclasses of Configurable must call the `__init__()` method of `Configurable` before doing anything else and using `super()`:

        class MyConfigurable(Configurable):
            def __init__(self, config=None):
                super(MyConfigurable, self).__init__(config)
                # Then any other code you need to finish initialization.

    This ensures that instances will be configured properly.

  `add_task`(task)

    Add a task to the job.

    Parameters : | task : `WinHPCTask` The task object to add.

  `as_element`()
  `auto_calculate_max`

    A boolean (True, False) trait.

  `auto_calculate_min`

    A boolean (True, False) trait.

  classmethod `class_config_section`()

    Get the config class config section

  classmethod `class_get_help`()

    Get the help string for this class in ReST format.

  classmethod `class_get_trait_help`(trait)

    Get the help string for a single trait.

  classmethod `class_print_help`()

    Get the help string for a single trait and print it.

  classmethod `class_trait_names`(**metadata)

    Get a list of all the names of this classes traits.

    This method is just like the `trait_names()` method, but is unbound.

  classmethod `class_traits`(**metadata)

    Get a list of all the traits of this class.

    This method is just like the `traits()` method, but is unbound.

    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.

  `config`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `created` = None
  `is_exclusive`

    A boolean (True, False) trait.

  `job_id`

    A trait for unicode strings.

  `job_name`

    A trait for unicode strings.

  `job_type`

    A trait for unicode strings.

  `max_cores`

    A integer trait.

  `max_nodes`

    A integer trait.

  `max_sockets`

    A integer trait.

  `min_cores`

    A integer trait.

  `min_nodes`

    A integer trait.

  `min_sockets`

    A integer trait.

  `on_trait_change`(handler, name=None, remove=False)

    Setup a handler to be called when a trait changes.

    This is used to setup dynamic notifications of trait changes.

    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.

  `owner`
  `priority`

    An enum that whose value must be in a given sequence.

  `project`

    A trait for unicode strings.

  `requested_nodes`

    A trait for unicode strings.

  `run_until_canceled`

    A boolean (True, False) trait.

  `tasks`

    An instance of a Python list.

  `tostring`()

    Return the string representation of the job description XML.

  `trait_metadata`(traitname, key)

    Get metadata values for trait by key.

  `trait_names`(**metadata)

    Get a list of all the names of this classes traits.

  `traits`(**metadata)

    Get a list of all the traits of this class.

    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.

  `unit_type`

    A trait for unicode strings.

  `username`

    A trait for unicode strings.

  `version`

    A trait for unicode strings.

  `write`(filename)

    Write the XML job description to a file.

  `xmlns`

    A trait for unicode strings.

### `IPControllerTask`

class `IPython.parallel.apps.winhpcjob.` `IPControllerTask`(config=None)

  Bases: `IPython.parallel.apps.winhpcjob.WinHPCTask`

  `__init__`(config=None)
  `as_element`()
  classmethod `class_config_section`()

    Get the config class config section

  classmethod `class_get_help`()

    Get the help string for this class in ReST format.

  classmethod `class_get_trait_help`(trait)

    Get the help string for a single trait.

  classmethod `class_print_help`()

    Get the help string for a single trait and print it.

  classmethod `class_trait_names`(**metadata)

    Get a list of all the names of this classes traits.

    This method is just like the `trait_names()` method, but is unbound.

  classmethod `class_traits`(**metadata)

    Get a list of all the traits of this class.

    This method is just like the `traits()` method, but is unbound.

    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.

  `command_line`
  `config`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `controller_args`

    An instance of a Python list.

  `controller_cmd`

    An instance of a Python list.

  `created` = None
  `environment_variables`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `get_env_vars`()
  `is_parametric`

    A boolean (True, False) trait.

  `is_rerunnaable`

    A boolean (True, False) trait.

  `max_cores`

    A integer trait.

  `max_nodes`

    A integer trait.

  `max_sockets`

    A integer trait.

  `min_cores`

    A integer trait.

  `min_nodes`

    A integer trait.

  `min_sockets`

    A integer trait.

  `on_trait_change`(handler, name=None, remove=False)

    Setup a handler to be called when a trait changes.

    This is used to setup dynamic notifications of trait changes.

    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.

  `std_err_file_path`

    A trait for unicode strings.

  `std_out_file_path`

    A trait for unicode strings.

  `task_id`

    A trait for unicode strings.

  `task_name`

    A trait for unicode strings.

  `trait_metadata`(traitname, key)

    Get metadata values for trait by key.

  `trait_names`(**metadata)

    Get a list of all the names of this classes traits.

  `traits`(**metadata)

    Get a list of all the traits of this class.

    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.

  `unit_type`

    A trait for unicode strings.

  `version`

    A trait for unicode strings.

  `work_directory`

    A trait for unicode strings.

### `IPEngineSetJob`

class `IPython.parallel.apps.winhpcjob.` `IPEngineSetJob`(**kwargs)

  Bases: `IPython.parallel.apps.winhpcjob.WinHPCJob`

  `__init__`(**kwargs)

    Create a configurable given a config config.

    Parameters : | config : Config If this is empty, default values are used. If config is a `Config` instance, it will be used to configure the instance.

    Notes

    Subclasses of Configurable must call the `__init__()` method of `Configurable` before doing anything else and using `super()`:

        class MyConfigurable(Configurable):
            def __init__(self, config=None):
                super(MyConfigurable, self).__init__(config)
                # Then any other code you need to finish initialization.

    This ensures that instances will be configured properly.

  `add_task`(task)

    Add a task to the job.

    Parameters : | task : `WinHPCTask` The task object to add.

  `as_element`()
  `auto_calculate_max`

    A boolean (True, False) trait.

  `auto_calculate_min`

    A boolean (True, False) trait.

  classmethod `class_config_section`()

    Get the config class config section

  classmethod `class_get_help`()

    Get the help string for this class in ReST format.

  classmethod `class_get_trait_help`(trait)

    Get the help string for a single trait.

  classmethod `class_print_help`()

    Get the help string for a single trait and print it.

  classmethod `class_trait_names`(**metadata)

    Get a list of all the names of this classes traits.

    This method is just like the `trait_names()` method, but is unbound.

  classmethod `class_traits`(**metadata)

    Get a list of all the traits of this class.

    This method is just like the `traits()` method, but is unbound.

    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.

  `config`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `created` = None
  `is_exclusive`

    A boolean (True, False) trait.

  `job_id`

    A trait for unicode strings.

  `job_name`

    A trait for unicode strings.

  `job_type`

    A trait for unicode strings.

  `max_cores`

    A integer trait.

  `max_nodes`

    A integer trait.

  `max_sockets`

    A integer trait.

  `min_cores`

    A integer trait.

  `min_nodes`

    A integer trait.

  `min_sockets`

    A integer trait.

  `on_trait_change`(handler, name=None, remove=False)

    Setup a handler to be called when a trait changes.

    This is used to setup dynamic notifications of trait changes.

    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.

  `owner`
  `priority`

    An enum that whose value must be in a given sequence.

  `project`

    A trait for unicode strings.

  `requested_nodes`

    A trait for unicode strings.

  `run_until_canceled`

    A boolean (True, False) trait.

  `tasks`

    An instance of a Python list.

  `tostring`()

    Return the string representation of the job description XML.

  `trait_metadata`(traitname, key)

    Get metadata values for trait by key.

  `trait_names`(**metadata)

    Get a list of all the names of this classes traits.

  `traits`(**metadata)

    Get a list of all the traits of this class.

    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.

  `unit_type`

    A trait for unicode strings.

  `username`

    A trait for unicode strings.

  `version`

    A trait for unicode strings.

  `write`(filename)

    Write the XML job description to a file.

  `xmlns`

    A trait for unicode strings.

### `IPEngineTask`

class `IPython.parallel.apps.winhpcjob.` `IPEngineTask`(config=None)

  Bases: `IPython.parallel.apps.winhpcjob.WinHPCTask`

  `__init__`(config=None)
  `as_element`()
  classmethod `class_config_section`()

    Get the config class config section

  classmethod `class_get_help`()

    Get the help string for this class in ReST format.

  classmethod `class_get_trait_help`(trait)

    Get the help string for a single trait.

  classmethod `class_print_help`()

    Get the help string for a single trait and print it.

  classmethod `class_trait_names`(**metadata)

    Get a list of all the names of this classes traits.

    This method is just like the `trait_names()` method, but is unbound.

  classmethod `class_traits`(**metadata)

    Get a list of all the traits of this class.

    This method is just like the `traits()` method, but is unbound.

    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.

  `command_line`
  `config`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `created` = None
  `engine_args`

    An instance of a Python list.

  `engine_cmd`

    An instance of a Python list.

  `environment_variables`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `get_env_vars`()
  `is_parametric`

    A boolean (True, False) trait.

  `is_rerunnaable`

    A boolean (True, False) trait.

  `max_cores`

    A integer trait.

  `max_nodes`

    A integer trait.

  `max_sockets`

    A integer trait.

  `min_cores`

    A integer trait.

  `min_nodes`

    A integer trait.

  `min_sockets`

    A integer trait.

  `on_trait_change`(handler, name=None, remove=False)

    Setup a handler to be called when a trait changes.

    This is used to setup dynamic notifications of trait changes.

    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.

  `std_err_file_path`

    A trait for unicode strings.

  `std_out_file_path`

    A trait for unicode strings.

  `task_id`

    A trait for unicode strings.

  `task_name`

    A trait for unicode strings.

  `trait_metadata`(traitname, key)

    Get metadata values for trait by key.

  `trait_names`(**metadata)

    Get a list of all the names of this classes traits.

  `traits`(**metadata)

    Get a list of all the traits of this class.

    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.

  `unit_type`

    A trait for unicode strings.

  `version`

    A trait for unicode strings.

  `work_directory`

    A trait for unicode strings.

### `WinHPCJob`

class `IPython.parallel.apps.winhpcjob.` `WinHPCJob`(**kwargs)

  Bases: `IPython.config.configurable.Configurable`

  `__init__`(**kwargs)

    Create a configurable given a config config.

    Parameters : | config : Config If this is empty, default values are used. If config is a `Config` instance, it will be used to configure the instance.

    Notes

    Subclasses of Configurable must call the `__init__()` method of `Configurable` before doing anything else and using `super()`:

        class MyConfigurable(Configurable):
            def __init__(self, config=None):
                super(MyConfigurable, self).__init__(config)
                # Then any other code you need to finish initialization.

    This ensures that instances will be configured properly.

  `add_task`(task)

    Add a task to the job.

    Parameters : | task : `WinHPCTask` The task object to add.

  `as_element`()
  `auto_calculate_max`

    A boolean (True, False) trait.

  `auto_calculate_min`

    A boolean (True, False) trait.

  classmethod `class_config_section`()

    Get the config class config section

  classmethod `class_get_help`()

    Get the help string for this class in ReST format.

  classmethod `class_get_trait_help`(trait)

    Get the help string for a single trait.

  classmethod `class_print_help`()

    Get the help string for a single trait and print it.

  classmethod `class_trait_names`(**metadata)

    Get a list of all the names of this classes traits.

    This method is just like the `trait_names()` method, but is unbound.

  classmethod `class_traits`(**metadata)

    Get a list of all the traits of this class.

    This method is just like the `traits()` method, but is unbound.

    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.

  `config`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `created` = None
  `is_exclusive`

    A boolean (True, False) trait.

  `job_id`

    A trait for unicode strings.

  `job_name`

    A trait for unicode strings.

  `job_type`

    A trait for unicode strings.

  `max_cores`

    A integer trait.

  `max_nodes`

    A integer trait.

  `max_sockets`

    A integer trait.

  `min_cores`

    A integer trait.

  `min_nodes`

    A integer trait.

  `min_sockets`

    A integer trait.

  `on_trait_change`(handler, name=None, remove=False)

    Setup a handler to be called when a trait changes.

    This is used to setup dynamic notifications of trait changes.

    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.

  `owner`
  `priority`

    An enum that whose value must be in a given sequence.

  `project`

    A trait for unicode strings.

  `requested_nodes`

    A trait for unicode strings.

  `run_until_canceled`

    A boolean (True, False) trait.

  `tasks`

    An instance of a Python list.

  `tostring`()

    Return the string representation of the job description XML.

  `trait_metadata`(traitname, key)

    Get metadata values for trait by key.

  `trait_names`(**metadata)

    Get a list of all the names of this classes traits.

  `traits`(**metadata)

    Get a list of all the traits of this class.

    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.

  `unit_type`

    A trait for unicode strings.

  `username`

    A trait for unicode strings.

  `version`

    A trait for unicode strings.

  `write`(filename)

    Write the XML job description to a file.

  `xmlns`

    A trait for unicode strings.

### `WinHPCTask`

class `IPython.parallel.apps.winhpcjob.` `WinHPCTask`(**kwargs)

  Bases: `IPython.config.configurable.Configurable`

  `__init__`(**kwargs)

    Create a configurable given a config config.

    Parameters : | config : Config If this is empty, default values are used. If config is a `Config` instance, it will be used to configure the instance.

    Notes

    Subclasses of Configurable must call the `__init__()` method of `Configurable` before doing anything else and using `super()`:

        class MyConfigurable(Configurable):
            def __init__(self, config=None):
                super(MyConfigurable, self).__init__(config)
                # Then any other code you need to finish initialization.

    This ensures that instances will be configured properly.

  `as_element`()
  classmethod `class_config_section`()

    Get the config class config section

  classmethod `class_get_help`()

    Get the help string for this class in ReST format.

  classmethod `class_get_trait_help`(trait)

    Get the help string for a single trait.

  classmethod `class_print_help`()

    Get the help string for a single trait and print it.

  classmethod `class_trait_names`(**metadata)

    Get a list of all the names of this classes traits.

    This method is just like the `trait_names()` method, but is unbound.

  classmethod `class_traits`(**metadata)

    Get a list of all the traits of this class.

    This method is just like the `traits()` method, but is unbound.

    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.

  `command_line`

    A trait for unicode strings.

  `config`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `created` = None
  `environment_variables`

    A trait whose value must be an instance of a specified class.

    The value can also be an instance of a subclass of the specified class.

  `get_env_vars`()
  `is_parametric`

    A boolean (True, False) trait.

  `is_rerunnaable`

    A boolean (True, False) trait.

  `max_cores`

    A integer trait.

  `max_nodes`

    A integer trait.

  `max_sockets`

    A integer trait.

  `min_cores`

    A integer trait.

  `min_nodes`

    A integer trait.

  `min_sockets`

    A integer trait.

  `on_trait_change`(handler, name=None, remove=False)

    Setup a handler to be called when a trait changes.

    This is used to setup dynamic notifications of trait changes.

    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.

  `std_err_file_path`

    A trait for unicode strings.

  `std_out_file_path`

    A trait for unicode strings.

  `task_id`

    A trait for unicode strings.

  `task_name`

    A trait for unicode strings.

  `trait_metadata`(traitname, key)

    Get metadata values for trait by key.

  `trait_names`(**metadata)

    Get a list of all the names of this classes traits.

  `traits`(**metadata)

    Get a list of all the traits of this class.

    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.

  `unit_type`

    A trait for unicode strings.

  `version`

    A trait for unicode strings.

  `work_directory`

    A trait for unicode strings.

## Functions

`IPython.parallel.apps.winhpcjob.` `as_str`(value)

`IPython.parallel.apps.winhpcjob.` `find_username`()

`IPython.parallel.apps.winhpcjob.` `indent`(elem, level=0)

### Navigation

- index
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »