ipic - The internal Picturesque module
ipic.lang - The crown jewel
- ipic.lang.lexer(program, is_console=False, filename=None, is_artist=False)
The Picturesque lexer.
- Parameters:
program – The program to be executed.
is_console – Specifies if it is in the interpreter console or not. Defaults to
False.filename – The filename to be executed. Defaults to
'<console>'.is_artist – Specifies if the file is being executed in the Artist editor.
- ipic.lang.interpret(do, val, lineno, line, is_console, filename, is_artist)
The Picturesque interpreter. Used by
ipic.lang.lexer()to execute the program. All arguments are required.- Parameters:
do – The command.
val – The arguments.
lineno – The statement number.
line – The statement.
is_console – Specifies if it is in the interpreter console or not.
filename – The filename to be executed.
is_artist – Specifies if the file is being executed in the Artist editor.
ipic.errors - Picturesque exceptions
- class ipic.errors.PicturesqueException(msg='')
The base exception for all Picturesque exceptions. Extends
Exception.
The other exceptions are PicturesqueUnreconizedCommandException, PicturesqueUnreconizedEventException, PicturesqueCommandAlreadyInNamespaceException, and PicturesqueWindowNotFoundException, PicturesqueInvalidWidgetException.
ipic.out - The PicturesqueOutputHandler class
- class ipic.out.PicturesqueOutputHandler
What
ipic.lang.outis an instance of.- bind(evt, func)
Bind the function func to the event evt. evt can be:
- output
Do func when output is called.
- error
Do func when an error occurs.
- onrequestclearscreen
Do func when requestclearscreen is called.
- output(text)
Output the text text.
- error(err)
Call the
errorevent handler with the error err.
- requestclearscreen()
Call the
onrequestclearscreenevent handler.