Add /plugins python_version command

This commit is contained in:
James Booth
2016-07-24 02:12:56 +01:00
parent b48a3d2f6a
commit 4209b1cf45
5 changed files with 26 additions and 5 deletions

View File

@@ -65,6 +65,12 @@ _unref_module(PyObject *module)
Py_XDECREF(module);
}
const char*
python_get_version(void)
{
return Py_GetVersion();
}
void
python_env_init(void)
{
@@ -72,9 +78,6 @@ python_env_init(void)
python_init_prof();
const char *ver = Py_GetVersion();
cons_show("PYTHON: %s", ver);
gchar *plugins_dir = plugins_get_dir();
GString *path = g_string_new("import sys\n");
g_string_append(path, "sys.path.append(\"");