Static Public Member Functions

FBPython Class Reference

Search for all occurrences

Detailed Description

Definition at line 77 of file fbpython.h.

#include <fbpython.h>

List of all members.

Static Public Member Functions

static const char *  GetVersion ()
  Get the version of the Python interpreter.
static const char *  GetPlatform ()
  Get the target platform of the Python interpreter.
static const char *  GetStdout (FBPythonContext *pPythonContext=NULL)
  Get the value of stdout.
static const char *  GetStderr (FBPythonContext *pPythonContext=NULL)
  Get the value of stderr.
static bool  ParseLine (const char *pLine, FBPythonContext *pPythonContext=NULL)
  Submit a line of code for parsing.
static bool  EvalLine (FBPythonContext *pPythonContext=NULL)
  Submit the last line of code parsed for evaluation.
static bool  EvalFile (const char *pFilename, FBPythonContext *pPythonContext=NULL)
  Execute a python script file within the given context.
static bool  ExecuteScript (const char *pFilename)
  Put a python script file in the execution queue.
static bool  ClearContext (FBPythonContext *pPythonContext=NULL)
  Clears the python context.

Member Function Documentation

static const char* GetVersion ( ) [static]

Get the version of the Python interpreter.

Returns:
A string indicating the version of the interpreter.
static const char* GetPlatform ( ) [static]

Get the target platform of the Python interpreter.

Returns:
A string indicating the platform for which the interpreter was compiled.
static const char* GetStdout ( FBPythonContext pPythonContext = NULL ) [static]

Get the value of stdout.

Parameters:
pPythonContext Context to get the Stdout from.
Returns:
A string containing the last stdout output.
static const char* GetStderr ( FBPythonContext pPythonContext = NULL ) [static]

Get the value of stderr.

Parameters:
pPythonContext Context to get the Stderr from.
Returns:
A string containing the last stderr output.
static bool ParseLine ( const char *  pLine,
FBPythonContext pPythonContext = NULL 
) [static]

Submit a line of code for parsing.

Parameters:
pLine Line of code that the Python interpreter should parse.
pPythonContext Context in which the parse will occur.
Returns:
true If there was a Python interpreter and the line was valid.
false If there were no interpreter or if there was an error parsing the code (consult stderr for more infos)
static bool EvalLine ( FBPythonContext pPythonContext = NULL ) [static]

Submit the last line of code parsed for evaluation.

Parameters:
pPythonContext Context in which the execution will occur.
Returns:
false If there were no interpreter or there were errors/unhandled exceptions. (consult stderr for more infos)
true If there was a Python interpreter and the code ran succesfully. (consult stdout for output, if any)
static bool EvalFile ( const char *  pFilename,
FBPythonContext pPythonContext = NULL 
) [static]

Execute a python script file within the given context.

Parameters:
pFilename The script file to execute.
pPythonContext Context in which the parse will occur.
Returns:
false If there were no interpreter or there were errors/unhandled exceptions. (consult stderr for more infos)
true If there was a Python interpreter and the code ran succesfully. (consult stdout for output, if any)
Remarks:
This function can only be used in the UI thread.
static bool ExecuteScript ( const char *  pFilename ) [static]

Put a python script file in the execution queue.

Clears the current context.

Parameters:
pFilename The script file to execute.
Returns:
false If there were no interpreter or there were errors/unhandled exceptions. (consult stderr for more infos)
true If there was a Python interpreter and the code ran succesfully. (consult stdout for output, if any)
Remarks:
This function can be used in any thread.
static bool ClearContext ( FBPythonContext pPythonContext = NULL ) [static]

Clears the python context.

Parameters:
pPythonContext Context to clear.
Returns:
false If there were no interpreter or if the context is invalid.
true If there was a Python interpreter and the context was valid.

The documentation for this class was generated from the following file:

FBPython FBPython FBPython FBPython FBPython FBPython FBPython FBPython FBPython FBPython
FBPython FBPython FBPython FBPython FBPython FBPython FBPython FBPython FBPython FBPython