ekg2  GIT master
Funkcje | Zmienne
Dokumentacja pliku python.c
#include "ekg2.h"
#include "python.h"
#include "python-ekg.h"
#include "python-config.h"
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <Python.h>
#include <compile.h>
#include <node.h>
Wykres zależności załączania dla python.c:

Funkcje

static int python_plugin_destroy ()
 
int python_load (script_t *)
 
int python_unload (script_t *)
 
int python_commands (script_t *, script_command_t *, char **)
 
int python_timers (script_t *, script_timer_t *, int)
 
int python_variable_changed (script_t *, script_var_t *, char *)
 
int python_query (script_t *, script_query_t *, void **)
 
int python_watches (script_t *, script_watch_t *, int, int, long int)
 
void python_dummy_sanity_check ()
 
int python_bind_free (script_t *, void *, int type, void *,...)
 
int python_command_eval (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int python_command_run (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int python_command_load (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int python_command_unload (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int python_command_list (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int python_print_version (void *data, va_list ap)
 
int python_exec (const char *command)
 
int python_run (const char *filename)
 
PyObject * python_get_func (PyObject *module, const char *name)
 
script_tpython_find_script (PyObject *module)
 
char * python_geterror (script_t *s)
 
int python_initialize ()
 
int python_finalize ()
 
int python_plugin_init (int prio)
 

Zmienne

plugin_t python_plugin = { .name = "python", .pclass = PLUGIN_SCRIPTING , .destroy = python_plugin_destroy, .theme_init = NULL }
 
scriptlang_t python_lang = { name: "python", plugin: & python_plugin, ext: ".py" , init: python_initialize, deinit: python_finalize, script_load: python_load, script_unload: python_unload, script_free_bind: python_bind_free, script_handler_query : python_query, script_handler_command: python_commands, script_handler_timer : python_timers, script_handler_var : python_variable_changed, script_handler_watch : python_watches, }
 

Dokumentacja funkcji

◆ python_bind_free()

int python_bind_free ( script_t scr,
void *  data,
int  type,
void *  priv_data,
  ... 
)

◆ python_command_eval()

int python_command_eval ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

python_command_eval()

execute python code

◆ python_command_list()

int python_command_list ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

python_command_list()

list loaded python scripts

◆ python_command_load()

int python_command_load ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

python_command_load()

load python script

◆ python_command_run()

int python_command_run ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

python_command_run()

run single python script

◆ python_command_unload()

int python_command_unload ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

python_command_unload()

unload python script

◆ python_commands()

int python_commands ( script_t scr,
script_command_t comm,
char **  params 
)

◆ python_dummy_sanity_check()

void python_dummy_sanity_check ( )

◆ python_exec()

int python_exec ( const char *  command)

python_exec()

run python code

  • command - code to run

◆ python_finalize()

int python_finalize ( )

python_finalize()

clean interpreter, unload modules, scripts etc.

◆ python_find_script()

script_t* python_find_script ( PyObject *  module)

◆ python_get_func()

PyObject* python_get_func ( PyObject *  module,
const char *  name 
)

◆ python_geterror()

char* python_geterror ( script_t s)

◆ python_initialize()

int python_initialize ( )

python_initialize()

initialize interpreter

◆ python_load()

int python_load ( script_t s)

◆ python_plugin_destroy()

static int python_plugin_destroy ( )
static

python_plugin

plugin definition

python_plugin_destroy()

remove plugin

◆ python_plugin_init()

int python_plugin_init ( int  prio)

python_plugin_init()

inicjalizacja pluginu

◆ python_print_version()

int python_print_version ( void *  data,
va_list  ap 
)

◆ python_query()

int python_query ( script_t scr,
script_query_t scr_que,
void **  args 
)

python_protocol_message_query()

handle signals

◆ python_run()

int python_run ( const char *  filename)

python_run()

run python script from file

  • filename - path to file to run

◆ python_timers()

int python_timers ( script_t scr,
script_timer_t time,
int  type 
)

◆ python_unload()

int python_unload ( script_t s)

◆ python_variable_changed()

int python_variable_changed ( script_t scr,
script_var_t scr_var,
char *  newval 
)

◆ python_watches()

int python_watches ( script_t scr,
script_watch_t scr_wat,
int  type,
int  fd,
long int  watch 
)

Dokumentacja zmiennych

◆ python_lang

scriptlang_t python_lang = { name: "python", plugin: & python_plugin, ext: ".py" , init: python_initialize, deinit: python_finalize, script_load: python_load, script_unload: python_unload, script_free_bind: python_bind_free, script_handler_query : python_query, script_handler_command: python_commands, script_handler_timer : python_timers, script_handler_var : python_variable_changed, script_handler_watch : python_watches, }

◆ python_plugin

plugin_t python_plugin = { .name = "python", .pclass = PLUGIN_SCRIPTING , .destroy = python_plugin_destroy, .theme_init = NULL }