Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | resetbuffer |
def | interact |
def | push |
def | raw_input |
![]() | |
def | __init__ |
def | runsource |
def | runcode |
def | showsyntaxerror |
def | showtraceback |
def | write |
Data Fields | |
filename | |
buffer | |
![]() | |
locals | |
compile | |
Closely emulate the behavior of the interactive Python interpreter. This class builds on InteractiveInterpreter and adds prompting using the familiar sys.ps1 and sys.ps2, and input buffering.
def __init__ | ( | self, | |
locals = None , |
|||
filename = "<console>" |
|||
) |
Constructor. The optional locals argument will be passed to the InteractiveInterpreter base class. The optional filename argument should specify the (file)name of the input stream; it will show up in tracebacks.
Definition at line 187 of file code.py.
def interact | ( | self, | |
banner = None |
|||
) |
Closely emulate the interactive Python console. The optional banner argument specify the banner to print before the first interaction; by default it prints a banner similar to the one printed by the real Python interpreter, followed by the current class name in parentheses (so as not to confuse this with the real interpreter -- since it's so close!).
Definition at line 205 of file code.py.
References async_chat.push(), InteractiveConsole.push(), fifo.push(), InteractiveConsole.raw_input(), InteractiveConsole.resetbuffer(), locale.str(), Pickler.write, openrsrc.write(), _Hqxcoderengine.write(), _Rlecoderengine.write(), InteractiveInterpreter.write(), BinHex.write(), Marshaller.write, and file_wrapper.write.
def push | ( | self, | |
line | |||
) |
Push a line to the interpreter. The line should not have a trailing newline; it may have internal newlines. The line is appended to a buffer and the interpreter's runsource() method is called with the concatenated contents of the buffer as source. If this indicates that the command was executed or invalid, the buffer is reset; otherwise, the command is incomplete, and the buffer is left as it was after the line was appended. The return value is 1 if more input is required, 0 if the line was dealt with in some way (this is the same as runsource()).
Definition at line 250 of file code.py.
References InteractiveConsole.buffer, InteractiveConsole.filename, MiniFieldStorage.filename, FieldStorage.filename, dospath.join(), InteractiveConsole.resetbuffer(), and InteractiveInterpreter.runsource().
def raw_input | ( | self, | |
prompt = "" |
|||
) |
Write a prompt and read a line. The returned line does not include the trailing newline. When the user enters the EOF key sequence, EOFError is raised. The base implementation uses the built-in function raw_input(); a subclass may replace this with a different implementation.
Definition at line 271 of file code.py.
def resetbuffer | ( | self) |