FBPython is for python users to run python script and communicate with MotionBuilder internal python facility. More...
#include <fbpython.h>
Static Public Member Functions | |
static const char * | GetVersion () |
Get the version of the Python interpreter. More... | |
static const char * | GetPlatform () |
Get the target platform of the Python interpreter. More... | |
static const char * | GetStdout (FBPythonContext *pPythonContext=NULL) |
Get the value of stdout. More... | |
static const char * | GetStderr (FBPythonContext *pPythonContext=NULL) |
Get the value of stderr. More... | |
static bool | ParseLine (const char *pLine, FBPythonContext *pPythonContext=NULL) |
Submit a line of code for parsing. More... | |
static bool | EvalLine (FBPythonContext *pPythonContext=NULL) |
Submit the last line of code parsed for evaluation. More... | |
static bool | EvalLines (const char *pScript, FBPythonContext *pPythonContext=NULL) |
Submit a script for parsing and execution. More... | |
static bool | EvalFile (const char *pFilename, FBPythonContext *pPythonContext=NULL) |
Execute a python script file within the given context. More... | |
static bool | ExecuteScript (const char *pFilename) |
Put a python script file in the execution queue. More... | |
static bool | ClearContext (FBPythonContext *pPythonContext=NULL) |
Clears the python context. More... | |
FBPython is for python users to run python script and communicate with MotionBuilder internal python facility.
Warning: When the user is calling the methods of FBPython in another thread other than MotionBuilder main thread, the user needs to create new thread state because Python internally prevents from illegal access to its internal Python objects if the current thread is not created by Python or has no thread state. In order to address this issue, the user could use the following workaround.
PyGILState_Ensure will create a new thread state for current calling thread.
Definition at line 93 of file fbpython.h.
|
static |
Clears the python context.
pPythonContext | Context to clear. |
|
static |
Execute a python script file within the given context.
pFilename | The script file to execute. |
pPythonContext | Context in which the parse will occur. |
|
static |
Submit the last line of code parsed for evaluation.
pPythonContext | Context in which the execution will occur. |
|
static |
Submit a script for parsing and execution.
pScript | String to evaluate. |
pPythonContext | Context in which the execution will occur. |
|
static |
Put a python script file in the execution queue.
Clears the current context.
pFilename | The script file to execute. |
|
static |
Get the target platform of the Python interpreter.
|
static |
Get the value of stderr.
pPythonContext | Context to get the Stderr from. |
|
static |
Get the value of stdout.
pPythonContext | Context to get the Stdout from. |
|
static |
Get the version of the Python interpreter.
|
static |
Submit a line of code for parsing.
pLine | Line of code that the Python interpreter should parse. |
pPythonContext | Context in which the parse will occur. |