launcher¶
This is the launcher for all pipeline related launching operations
This launcher is used for console_scripts and gui_scripts entry points of setuptools. It is used for all commandline actions of the pipeline. For useage execute:
jukebox -h
This requires jukeboxcore to be installed via setuptools (pip or easy_install will do that for you). You can also execute this script directly.
It’s duty is to initialize the pipeline and then launch whatever plugin is requested. It also mirrors the django manage commands of manage.py.
- class jukeboxcore.launcher.Launcher[source]¶
Bases: object
Provides commands and handles argument parsing
Initialize parsers
Raises: None - setup_core_parser()[source]¶
Setup the core parser
Returns: the parser Return type: argparse.ArgumentParser Raises: None
- setup_cmd_subparsers(parser)[source]¶
Add a subparser for commands to the given parser
Parameters: parser (argparse.ArgumentParser) – the argument parser to setup Returns: the subparser action object Return type: action object Raises: None
- setup_launch_parser(parser)[source]¶
Setup the given parser for the launch command
Parameters: parser (argparse.ArgumentParser) – the argument parser to setup Returns: None Return type: None Raises: None
- launch(args, unknown)[source]¶
Launch something according to the provided arguments
Parameters: - args (Namespace) – arguments from the launch parser
- unknown (list) – list of unknown arguments
Returns: None
Return type: None
Raises: SystemExit
- setup_list_parser(parser)[source]¶
Setup the given parser for the list command
Parameters: parser (argparse.ArgumentParser) – the argument parser to setup Returns: None Return type: None Raises: None
- list(args, unknown)[source]¶
List all addons that can be launched
Parameters: - args (Namespace) – arguments from the launch parser
- unknown (list) – list of unknown arguments
Returns: None
Return type: None
Raises: None
- setup_manage_parser(parser)[source]¶
Setup the given parser for manage command
Parameters: parser (argparse.ArgumentParser) – the argument parser to setup Returns: None Return type: None Raises: None
- manage(namespace, unknown)[source]¶
Execute the manage command for django
Parameters: - namespace (Namespace) – namespace containing args with django manage.py arguments
- unknown (list) – list of unknown arguments that get passed to the manage.py command
Returns: None
Return type: None
Raises: None
- setup_compile_ui_parser(parser)[source]¶
Setup the given parser for the compile_ui command
Parameters: parser (argparse.ArgumentParser) – the argument parser to setup Returns: None Return type: None Raises: None
- compile_ui(namespace, unknown)[source]¶
Compile qt designer files
Parameters: - namespace (Namespace) – namespace containing arguments from the launch parser
- unknown (list) – list of unknown arguments
Returns: None
Return type: None
Raises: None
- setup_compile_rcc_parser(parser)[source]¶
Setup the given parser for the compile_rcc command
Parameters: parser (argparse.ArgumentParser) – the argument parser to setup Returns: None Return type: None Raises: None
- compile_rcc(namespace, unknown)[source]¶
Compile qt resource files
Parameters: - namespace (Namespace) – namespace containing arguments from the launch parser
- unknown (list) – list of unknown arguments
Returns: None
Return type: None
Raises: None
- parse_args(args=None)[source]¶
Parse the given arguments
All commands should support executing a function, so you can use the arg Namespace like this:
launcher = Launcher() args, unknown = launcher.parse_args() args.func(args, unknown) # execute the command
Parameters: args – arguments to pass Returns: the parsed arguments and all unknown arguments Return type: (Namespace, list) Raises: None