Command Line Interface (xonsh.main
)¶
The main xonsh script.
-
class
xonsh.main.
XonshMode
[source]¶ An enumeration.
-
interactive
= 3¶
-
script_from_file
= 1¶
-
script_from_stdin
= 2¶
-
single_command
= 0¶
-
-
xonsh.main.
main_context
(argv=None)[source]¶ Generator that runs pre- and post-main() functions. This has two iterations. The first yields the shell. The second returns None but cleans up the shell.
-
xonsh.main.
path_argument
(s)[source]¶ Return a path only if the path is actually legal
This is very similar to argparse.FileType, except that it doesn’t return an open file handle, but rather simply validates the path.