Skip to content

Command line argument when starting the CLI #1175

Answered by kmvanbrunt
wsande asked this question in Q&A
Discussion options

You must be logged in to vote

cmd2.Cmd.__init__ has a slightly misleading parameter called allow_cli_args. You need to set that to False if you are processing your own command line args.

:param allow_cli_args: if True, then :meth:cmd2.Cmd.__init__ will process command line arguments as either commands to be run or, if -t or --test are given, transcript files to run. This should be set to False if your application parses its own command line arguments.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@wsande
Comment options

@kmvanbrunt
Comment options

@wsande
Comment options

@kmvanbrunt
Comment options

@wsande
Comment options

Answer selected by anselor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants