Python Examples

The following are code examples for showing how to use They are extracted from open source Python projects. You can vote up the examples you like or vote down the ones you don't like. You can also save this page to your account.

Example 1
Project: USTC-Software-2017   Author: igemsoftware2017   File:    (license) View Source Project 6 votes vote down vote up
def fetch_command(self, subcommand, command_sets=None):
        Tries to fetch the given subcommand. If it can't be found, prints a
        message with the appropriate command called from the command line
        (e.g. "biohub_cli").

        # Check if the subcommand is available
            app_name = self.available_commands[subcommand]
        except KeyError:
                "Unknown command: %r\nType '%s --help' for usage.\n"
                % (subcommand, self.prog_name))

        if isinstance(app_name, BaseCommand):
            klass = app_name
            klass = load_command_class(app_name, subcommand)

        return klass