Top "Subcommand" questions

Use this tag for questions related to subcommands, i.e. commands inside a routine.

Default sub-command, or handling no sub-command with argparse

How can I have a default sub-command, or handle the case where no sub-command is given using argparse? import argparse …

python parsing command-line-arguments argparse subcommand
argparse optional subparser (for --version)

I have the following code (using Python 2.7): # shared command line options, like --version or --verbose parser_shared = argparse.ArgumentParser(add_…

python command-line-interface argparse subcommand
How should I implement "nested" subcommands in Python?

Implementing "nested" subcommands in Python with cmdln. I'm not sure I'm using the right terminology here. I'm trying to implement …

python command-line subcommand
Sub-commands with bash

Is it possible to implement sub-commands for bash scripts. I have something like this in mind: http://docs.python.org/…

bash subcommand