|
__init__(self,
screen,
rect,
functions={ } ,
key_calls={ } ,
vars={ } ,
syntax={ } ) |
source code
|
|
|
load_cfg(self)
Loads the config file path/pygame-console.cfg All variables
are initialized to their defaults, then new values will be
loaded from the config file if it exists. |
source code
|
|
|
|
|
safe_set_attr(self,
name,
value)
Safely set the console variables |
source code
|
|
|
|
|
|
|
|
|
|
|
format_input_line(self)
Format input line to be displayed |
source code
|
|
|
draw(self)
Draw the console to the parent screen |
source code
|
|
|
|
|
|
|
|
|
submit_input(self,
text)
Submit input 1) Move input to output 2) Evaluate input 3) Clear input
line |
source code
|
|
|
send_python(self,
text)
Sends input the the python interpreter in effect giving the user the
ability to do anything python can. |
source code
|
|
|
send_pyconsole(self,
text)
Sends input to pyconsole to be interpreted |
source code
|
|
|
setvar(self,
name,
value)
Sets the value of a variable |
source code
|
|
|
getvar(self,
name)
Gets the value of a variable, this is useful for people that want to
access console variables from within their game |
source code
|
|
|
|
|
|
|
add_to_history(self,
text)
Add specified text to the history |
source code
|
|
|
clear_input(self)
Clear input line and reset cursor position |
source code
|
|
|
|
|
str_insert(self,
text,
strn)
Insert characters at the current cursor position |
source code
|
|
|
process_input(self,
event)
Loop through pygame events and evaluate them |
source code
|
|
|
convert_token(self,
tok)
Convert a token to its proper type |
source code
|
|
|
tokenize(self,
s)
Tokenize input line, convert tokens to proper types |
source code
|
|
|
|
|
|