Home | Trees | Indices | Help |
|
---|
|
Python interface to Flora2 (http://flora.sf.net)
|
|||
|
|||
|
|||
|
|
Constructor method Usage: flora2( path, args ) path - path to Flora2 executable (default: 'runflora') args - command line arguments (default: '--nobanner --quietload') self.engine becomes pexpect spawn instance of Flora2 shell Raises: SWIExecutableNotFound |
Loads module into self.engine Usage: instance.load( path ) path - path to module file Raises: Flora2CompileError |
Queries current engine state Usage: instance.query( query ) query - usual Flora2 query (example: '?x[ likes->?y ]') Returns: True - if yes/no query and answer is yes False - if yes/no query and answer is no List of dictionaries - if normal query. Dictionary keys are returned variable names. Example: >>> instance.query( '?person[ likes->?food ]' ) [{'person': 'john', 'food': 'curry'}, {'person': 'sandy', 'food': 'mushrooms'}] Raises: Flora2QueryError |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Aug 1 18:44:56 2012 | http://epydoc.sourceforge.net |