Compiliation, Evaluation, & Execution (xonsh.execer)

Implements the xonsh executer

class xonsh.execer.Execer(filename='<xonsh-code>', debug_level=0, parser_args=None)[source]

Executes xonsh code in a context.


filename : str, optional

File we are to execute.

debug_level : int, optional

Debugging level to use in lexing and parsing.

parser_args : dict, optional

Arguments to pass down to the parser.

compile(input, mode='exec', glbs=None, locs=None, stacklevel=2)[source]

Compiles xonsh code into a Python code object, which may then be execed or evaled.

eval(input, glbs=None, locs=None, stacklevel=2)[source]

Evaluates (and returns) xonsh code.

exec(input, mode='exec', glbs=None, locs=None, stacklevel=2)[source]

Execute xonsh code.

parse(input, ctx, mode='exec')[source]

Parses xonsh code in a context-aware fashion. For context-free parsing, please use the Parser class directly.

This Page