asyncutils.cli¶
Functions¶
|
Module Contents¶
- asyncutils.cli.run(argv: collections.abc.Iterable[str] | None = ...) int | None[source]¶
- Run this module’s REPL and return the integer return code.If passed,
argvshould be a non-string iterable of strings representing the command-line arguments, and it should not have the executable name as the first item.An attempt will be made to parse all arguments and the program will exit entirely on an unrecognized option.If an error somehow escapes the console and thepdboption is enabled,Nonewill be returned after calling the post-mortem debugger on its traceback.Execute
asyncutils -?, or callget_cmd_help(), to see detailed command-line usage.Warning
If you call this function manually, a daemon thread is spun up to execute the code in the console, which may still be kept alive by some internal mechanisms after the function returns. Worse still, if you call this function within another console, its standard input may completely cease to work.