Package schrodinger :: Package job :: Module util
[hide private]
[frames] | no frames]

Module util

Job Control utilities.

The 'hunt' function is a wrapper for running '$SCHRODINGER/hunt'.

Copyright Schrodinger, LLC. All rights reserved.

Functions [hide private]
str
_fast_hunt(product, dir='exec', host=None, release=None, min_release=None, compat=None, arch=None)
Look for the exec, lib, or data directory for a given Schrodinger product.
str
hunt(product, dir='exec', host=None, release=None, min_release=None, compat=None, arch=None)
Look for the exec, lib, or data directory for a given Schrodinger product.
Variables [hide private]
  _version = '$Revision: 1.16 $'
  _logger = schrodinger.utils.log.get_logger("schrodinger.job.ut...
  _EINTR_RETRY = 2
  __package__ = 'schrodinger.job'
Function Details [hide private]

_fast_hunt(product, dir='exec', host=None, release=None, min_release=None, compat=None, arch=None)

 

Look for the exec, lib, or data directory for a given Schrodinger product. For local searches in simple installations, avoid using hunt.py. Otherwise, call hunt function.

Parameters:
  • dir (str) - The type of directory to find; must be 'exec', 'lib', or 'data' and defaults to 'exec'.
  • host (str) - A remote host to use for searching.
  • release (str) - A specific version number to restrict searching to. Valid forms are '40', 'v4.0', 'v40028', '40037'.
  • min_release (str) - A minimum version number to restrict searching to. Accepts the same formats as the release argument. Note that if you want to specify a minimum release of mmshare, the schrodinger.version_at_least function will do so more quickly and will work with developer builds in addition to official builds.
  • compat (str or iterable with str elements) - An absolute pathname of an executable directory to require compatibility with. Compatibility with multiple executable directories can be specified by providing an iterable with all the directories as elements.
  • arch (str) - A particular platform code (for instance, 'Linux-x86'). This can be a regular expression that is compared with the name of the bin/ subdirectory.
Returns: str
The executable, lib, or data directory of the desired product, subject to the specified product/version compatibility requirements. If no directory is found, the empty string is returned.
Raises:
  • e - Raises an Exception if SCHRODINGER is not defined, or if the execution of hunt.py fails.

hunt(product, dir='exec', host=None, release=None, min_release=None, compat=None, arch=None)

 

Look for the exec, lib, or data directory for a given Schrodinger product.

Parameters:
  • dir (str) - The type of directory to find; must be 'exec', 'lib', or 'data' and defaults to 'exec'.
  • host (str) - A remote host to use for searching.
  • release (str) - A specific version number to restrict searching to. Valid forms are '40', 'v4.0', 'v40028', '40037'.
  • min_release (str) - A minimum version number to restrict searching to. Accepts the same formats as the release argument. Note that if you want to specify a minimum release of mmshare, the schrodinger.version_at_least function will do so more quickly and will work with developer builds in addition to official builds.
  • compat (str or iterable with str elements) - An absolute pathname of an executable directory to require compatibility with. Compatibility with multiple executable directories can be specified by providing an iterable with all the directories as elements.
  • arch (str) - A particular platform code (for instance, 'Linux-x86'). This can be a regular expression that is compared with the name of the bin/ subdirectory.
Returns: str
The executable, lib, or data directory of the desired product, subject to the specified product/version compatibility requirements. If no directory is found, the empty string is returned.
Raises:
  • e - Raises an Exception if SCHRODINGER is not defined, or if the execution of hunt.py fails.

Variables Details [hide private]

_logger

Value:
schrodinger.utils.log.get_logger("schrodinger.job.util")