bundles / traitlets 5.14.3 / traitlets / config / application / Application / _get_sys_argv
classmethod
traitlets.config.application:Application._get_sys_argv
Summary
Get sys.argv or equivalent from argcomplete
Extended Summary
argcomplete's strategy is to call the python script with no arguments, so len(sys.argv) == 1, and run until the ArgumentParser is constructed and determine what completions are available.
On the other hand, traitlet's subcommand-handling strategy is to check sys.argv[1] and see if it matches a subcommand, and if so then dynamically load the subcommand app and initialize it with sys.argv[1:].
This helper method helps to take the current tokens for argcomplete and pass them through as argv.
Aliases
-
traitlets.config.Application._get_sys_argv