Methods
|
|
_invocationError
_run
getCommandParent
getSubcommand
isInteractive
run
runMain
showHelp
show_help
|
|
_invocationError
|
_invocationError ( self, msg )
Write msg and usage to stderr if interactive, otherwise re-raise
|
|
_run
|
_run ( self )
Override this in subclasses to implement desired behavior
|
|
getCommandParent
|
getCommandParent ( self )
Get or create a component to be used as the subcommand's parent
|
|
getSubcommand
|
getSubcommand (
self,
executable,
**kw,
)
Return a ICmdLineApp with our environment as its defaults
Any IExecutable may be supplied as the basis for creating
the ICmdLineApp . NotImplementedError is raised if the
supplied object is not an IExecutable .
|
|
isInteractive
|
isInteractive ( self )
True if stdin is a terminal
|
|
run
|
run ( self )
Run the command
|
|
runMain
|
runMain ( cls )
Allow this command to be used as a console_scripts entry point
If you want to make a command class into a command that's installable
via setuptools, just add something like this to your setup():
entry_points = {
'console_scripts': [
'some_cmd = some.module:MyCmdClass.runMain'
]
}
This will create a some_cmd command line app that invokes your
command class, when you run "setup.py develop", or someone installs
your package.
|
|
showHelp
|
showHelp ( self )
Display usage message on stderr
|
|
show_help
|
show_help (
self,
parser,
optname,
optval,
remaining_args,
)
|