Fix python init errors.

pull/202/head
John Ralls 9 years ago
parent 2ac118f80c
commit 681d0271de

@ -73,8 +73,9 @@ libgncmod_python_gnc_module_init(int refcount)
*/
FILE *fp;
gchar *pkgdatadir, *init_filename;
char* argv = "";
Py_Initialize();
PySys_SetArgv(0, &argv);
#if PY_VERSION_HEX >= 0x03000000
PyInit__sw_app_utils();
PyInit__sw_core_utils();

@ -2,6 +2,8 @@ import sys
import _sw_app_utils
from gnucash import *
from _sw_core_utils import gnc_prefs_is_extra_enabled
from gi import require_version
require_version('Gtk', '3.0')
from gi.repository import Gtk
import os
sys.path.append(os.path.dirname(__file__))

Loading…
Cancel
Save