5/27/2023 0 Comments Read an inout from cmd c![]() This also allows the a set of CommandSets to be provided This allows CommandSets with custom constructor parameters to be command_sets – Provide CommandSet instances to load during cmd2 initialization.Then defaults to constants.DEFAULT_SHORTCUTS. shortcuts – dictionary containing shortcuts for commands.If your app only contains single-line commandsĪnd you want terminators to be treated as literals by the parser, Intended for terminating multiline commands, but will also terminators – list of characters that terminate a command.multiline_commands – list of commands allowed to accept multi-line input.Redirection and piping tokens, and they will be parsed as such ![]() This parameter prevents redirection and piping, butĭoes not alter parsing behavior. allow_redirection – If False, prevent output redirection and piping to shellĬommands.This allows running transcript tests when allow_cli_args transcript_files – pass a list of transcript files to be run on initialization.Set to False if your application parses its own command line test are given, transcript files to run. Line arguments as either commands to be run or, if -t or allow_cli_args – if True, then cmd2.Cmd._init_() will process command.include_ipy – should the “ipy” command be included for an embedded IPython shell.include_py – should the “py” command be included for an embedded Python shell.Anything written to stderr will still display. silence_startup_script – if True, then the startup script’s output will be.startup_script – file path to a script to execute at startup. ![]() persistent_history_length – max number of history items to write.persistent_history_file – file path to load a persistent cmd2 command history from.stdout – alternate output file object, if not specified, sys.stdout is used.stdin – alternate input file object, if not specified, sys.stdin is used.completekey – readline name of a completion key, default to Tab._init_ ( completekey: str = 'tab', stdin: Optional = None, stdout: Optional = None, *, persistent_history_file: str = '', persistent_history_length: int = 1000, startup_script: str = '', silence_startup_script: bool = False, include_py: bool = False, include_ipy: bool = False, allow_cli_args: bool = True, transcript_files: Optional] = None, allow_redirection: bool = True, multiline_commands: Optional] = None, terminators: Optional] = None, shortcuts: Optional] = None, command_sets: Optional] = None, auto_load_commands: bool = True, allow_clipboard: bool = True ) → None ¶Īn easy but powerful framework for writing line-oriented command Line-oriented command interpreters are often useful for test harnesses, internal tools, and rapid prototypes. ![]() Cmd ( completekey: str = 'tab', stdin: Optional = None, stdout: Optional = None, *, persistent_history_file: str = '', persistent_history_length: int = 1000, startup_script: str = '', silence_startup_script: bool = False, include_py: bool = False, include_ipy: bool = False, allow_cli_args: bool = True, transcript_files: Optional] = None, allow_redirection: bool = True, multiline_commands: Optional] = None, terminators: Optional] = None, shortcuts: Optional] = None, command_sets: Optional] = None, auto_load_commands: bool = True, allow_clipboard: bool = True ) ¶Īn easy but powerful framework for writing line-oriented command interpreters.Įxtends the Python Standard Library’s cmd package by adding a lot of useful features
0 Comments
Leave a Reply. |