ftrack_application_launcher package¶
Submodules¶
ftrack_application_launcher.asynchronous module¶
ftrack_application_launcher.configure_logging module¶
- ftrack_application_launcher.configure_logging.get_log_directory()[source]¶
Get log directory.
Will create the directory (recursively) if it does not exist.
Raise if the directory can not be created.
- ftrack_application_launcher.configure_logging.configure_logging(logger_name, level=None, format=None, extra_modules=None)[source]¶
Configure loggerName loggers with console and file handler.
Optionally specify log level (default WARNING)
Optionally set format, default: %(asctime)s - %(name)s - %(levelname)s - %(message)s.
Optional extra_modules to extend the modules to be set to level.
ftrack_application_launcher.discover_applications module¶
ftrack_application_launcher.usage module¶
Module contents¶
- ftrack_application_launcher.DEFAULT_VERSION_EXPRESSION = re.compile('(?P<version>\\d[\\d.vabc]*?)[^\\d]*$')¶
Default expression to match version component of executable path. Will match last set of numbers in string where numbers may contain a digit followed by zero or more digits, periods, or the letters ‘a’, ‘b’, ‘c’ or ‘v’ E.g. /path/to/x86/some/application/folder/v1.8v2b1/app.exe -> 1.8v2b1
- ftrack_application_launcher.prepend_path(path, key, environment)[source]¶
Prepend path to key in environment.
- ftrack_application_launcher.append_path(path, key, environment)[source]¶
Append path to key in environment.
- ftrack_application_launcher.pop_path(path, key, environment)[source]¶
Remove path to key in environment.
- class ftrack_application_launcher.ApplicationStore(session)[source]¶
Bases:
object
Discover and store available applications on this host.
- property current_os¶
- property session¶
Return current session.
- class ftrack_application_launcher.ApplicationLauncher(applicationStore)[source]¶
Bases:
object
Launch applications described by an application store.
Launched applications are started detached so exiting current process will not close launched applications.
- property current_os¶
- property location¶
Return current location.
- property session¶
Return current session.
- __init__(applicationStore)[source]¶
Instantiate launcher with applicationStore of applications.
applicationStore should be an instance of
ApplicationStore
holding information about applications that can be launched.
- launch(applicationIdentifier, context=None)[source]¶
Launch application matching applicationIdentifier.
context should provide information that can guide how to launch the application.
Return a dictionary of information containing:
success - A boolean value indicating whether application launched successfully or not. message - Any additional information (such as a failure message).
- class ftrack_application_launcher.ApplicationLaunchAction(*args: Any, **kwargs: Any)[source]¶
Bases:
BaseAction
- context = []¶
- property session¶
Return convenient exposure of the self._session reference.