polytracker.repl
repl classes
Commands
- class polytracker.repl.Commands(argument_parser: ArgumentParser)
- Bases: - Command- __init__(argument_parser: ArgumentParser)
 - __init_arguments__(parser: ArgumentParser)
- Initializes this command’s argument parser. - Subclasses should extend this function and add any necessary options to - parser.
 - extension_types: List[Type[CommandExtension]] | None = None
- An auto-populated list of eny extensions to this command. 
 - extensions: List[CommandExtension]
 - parent_parsers: Tuple[ArgumentParser, ...] = ()
- An optional sequence of parent argument parsers from which to parse options. 
 - run(args)
- Callback for when the command is run. - Parameters:
- args – The result of parsing the commandline arguments set up by - Command.__init_arguments__().
 
 - subcommand_types: List[Type[Subcommand]] | None = None
- An auto-populated list of subcommands of this command. 
 - subcommands: List[Subcommand]
 
PolyTrackerCompleter
- class polytracker.repl.PolyTrackerCompleter(repl: PolyTrackerREPL)
- Bases: - Completer- __init__(repl: PolyTrackerREPL)
 - bottom_toolbar()
 - get_completions(document, complete_event)
- This should be a generator that yields - Completioninstances.- If the generation of completions is something expensive (that takes a lot of time), consider wrapping this Completer class in a ThreadedCompleter. In that case, the completer algorithm runs in a background thread and completions will be displayed as soon as they arrive. - Parameters:
- document – - Documentinstance.
- complete_event – - CompleteEventinstance.
 
 
 - async get_completions_async(document: Document, complete_event: CompleteEvent) AsyncGenerator[Completion, None]
- Asynchronous generator for completions. (Probably, you won’t have to override this.) - Asynchronous generator of - Completionobjects.
 - rprompt()
 
PolyTrackerREPL
- class polytracker.repl.PolyTrackerREPL
- Bases: - object- __init__()
 - commands: Dict[str, REPLCommand] = {'commands': <polytracker.repl.REPLCommand object>, 'docker_run': <polytracker.repl.REPLCommand object>, 'extract_grammar': <polytracker.repl.REPLCommand object>, 'load_trace_tdag': <polytracker.repl.REPLCommand object>}
 - classmethod commands_command()
- print the PolyTracker commands 
 - classmethod current_instance() PolyTrackerREPL
 - print_exc()
 - classmethod register(command_name: str, discardable: bool = False)
- Function decorator for registering a command with this REPL 
 - registered_globals: Dict[str, Any] = {'CAN_RUN_NATIVELY': False, 'commands': <polytracker.repl.REPLCommand object>, 'docker_run': <polytracker.repl.REPLCommand object>, 'extract_grammar': <polytracker.repl.REPLCommand object>, 'load_trace_tdag': <polytracker.repl.REPLCommand object>}
 - run()
 - run_on_exit(function: Callable[[], Any])
- Registers a function to be executed when this REPL completes 
 - run_python(command)