#include <pythoninterface.h>
Static Public Member Functions | |
static bool | Start (int argc, char *argv[]) |
Starts up the Python services This function must be called BEFORE using any of the other Python services. | |
static bool | Stop () |
Stops the Python services This function must be called BEFORE finishing the application. | |
static PYOBJECT | Run (const char *a_sCode) |
Executes one line of Python code Interprets and executes one line of python code. | |
static PYOBJECT | RunFile (const char *a_sFilename) |
Executes the code contained on a file in disk Interprets and executes the code contained in a file identified by the provided filename. | |
static void | RunSimpleFile (const char *a_sFilename) |
Executes the code contained on a file in disk, discarding the result. |
Provides services for embedding Python.
To use, call Start at the beginning of your application. Use any of the embedding functions, then call Stop before terminating the application.
Definition at line 47 of file pythoninterface.h.
static PYOBJECT PythonInterface::Run | ( | const char * | a_sCode | ) | [static] |
Executes one line of Python code Interprets and executes one line of python code.
This function is equivalent to Python's interactive loop. A pointer to the resulting PyObject instance is provided. This result can also be NULL or Py_None.
a_sCode | A null-terminated string with Python conde |
static PYOBJECT PythonInterface::RunFile | ( | const char * | a_sFilename | ) | [static] |
Executes the code contained on a file in disk Interprets and executes the code contained in a file identified by the provided filename.
A pointer to the resulting PyObject instance is provided.
a_sFilename | Name of the file to execute |
static void PythonInterface::RunSimpleFile | ( | const char * | a_sFilename | ) | [static] |
Executes the code contained on a file in disk, discarding the result.
Interprets and executes the code contained in a given file, but discards any returned object. Use when you just want to run a script and you are not interested on what might come back from it.
a_sFilename | Name of the file to execute |
static bool PythonInterface::Start | ( | int | argc, | |
char * | argv[] | |||
) | [static] |
Starts up the Python services This function must be called BEFORE using any of the other Python services.
a_appSettings | Parameters used on our application |
static bool PythonInterface::Stop | ( | ) | [static] |
Stops the Python services This function must be called BEFORE finishing the application.