ekg2  GIT master
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje Grupay Strony
Definicje | Funkcje | Zmienne
Dokumentacja pliku python.h
#include <sys/types.h>
#include <Python.h>
#include <ekg/scripts.h>

Idź do kodu źródłowego tego pliku.

Definicje

#define Py_RETURN_NONE   return doPy_RETURN_NONE()
 
#define Py_RETURN_TRUE   return doPy_RETURN_TRUE()
 
#define Py_RETURN_FALSE   return doPy_RETURN_FALSE()
 
#define python_module(s)   ((PyObject *) script_private_get(s)) /* obiekt modułu */
 
#define PYTHON_HANDLE_HEADER(event, arg)
 
#define PYTHON_HANDLE_FOOTER()
 

Funkcje

static PyObject * doPy_RETURN_NONE ()
 
static PyObject * doPy_RETURN_TRUE ()
 
static PyObject * doPy_RETURN_FALSE ()
 
int python_run (const char *filename)
 
int python_exec (const char *command)
 
int python_autorun ()
 
int python_initialize ()
 
int python_finalize ()
 
int python_plugin_init ()
 
script_tpython_find_script (PyObject *module)
 
int python_load (script_t *s)
 
int python_unload (script_t *s)
 
char * python_geterror (script_t *s)
 
PyObject * python_get_func (PyObject *module, const char *name)
 

Zmienne

scriptlang_t python_lang
 

Dokumentacja definicji

#define Py_RETURN_FALSE   return doPy_RETURN_FALSE()
#define Py_RETURN_NONE   return doPy_RETURN_NONE()
#define Py_RETURN_TRUE   return doPy_RETURN_TRUE()
#define PYTHON_HANDLE_FOOTER ( )
Wartość:
Py_XDECREF(__py_r); \
Py_DECREF(pArgs);\
\
}
#define PYTHON_HANDLE_HEADER (   event,
  arg 
)
Wartość:
{ \
PyObject *__py_r; \
PyObject *pArgs = arg;\
python_handle_result = -1;\
\
__py_r = PyObject_Call(event, pArgs, NULL);\
\
if (__py_r && PyInt_Check(__py_r)) { \
python_handle_result = PyInt_AsLong(__py_r); \
} else if (!__py_r) {\
char *err = python_geterror(scr);\
print("script_error", err);\
xfree(err);\
}
char * python_geterror(script_t *s)
Definition: python.c:358
Definition: events.h:31
#define NULL
Definition: oralog.c:49
static DBusError err
Definition: dbus.c:38
void print(foo *f)
Definition: testcase_for_remove_iter.c:109
#define xfree
Definition: testcase_for_remove_iter.c:34
#define python_module (   s)    ((PyObject *) script_private_get(s)) /* obiekt modułu */

Dokumentacja funkcji

static PyObject* doPy_RETURN_FALSE ( )
inlinestatic
static PyObject* doPy_RETURN_NONE ( )
inlinestatic
static PyObject* doPy_RETURN_TRUE ( )
inlinestatic
int python_autorun ( )
int python_exec ( const char *  command)

python_exec()

run python code

  • command - code to run
int python_finalize ( )

python_finalize()

clean interpreter, unload modules, scripts etc.

script_t* python_find_script ( PyObject *  module)
PyObject* python_get_func ( PyObject *  module,
const char *  name 
)
char* python_geterror ( script_t s)
int python_initialize ( )

python_initialize()

initialize interpreter

int python_load ( script_t s)
int python_plugin_init ( )
int python_run ( const char *  filename)

python_run()

run python script from file

  • filename - path to file to run
int python_unload ( script_t s)

Dokumentacja zmiennych

scriptlang_t python_lang