comparison PyPlugScanner.cpp @ 25:7648f3f2fa14

cleaned up vampy preloading, no functional change. tried python preload, did not work.
author fazekasgy
date Tue, 18 Aug 2009 08:32:45 +0000
parents 7d28bed0864e
children e80caada79a8
comparison
equal deleted inserted replaced
24:7d28bed0864e 25:7648f3f2fa14
107 PyPlugScanner::getScriptClass(string path, string classname) 107 PyPlugScanner::getScriptClass(string path, string classname)
108 { 108 {
109 109
110 //Add plugin path to active Python Path 110 //Add plugin path to active Python Path
111 string pyCmd = "import sys\nsys.path.append('" + path + "')\n"; 111 string pyCmd = "import sys\nsys.path.append('" + path + "')\n";
112 PyRun_SimpleString(pyCmd.c_str()); 112 PyRun_SimpleString(pyCmd.c_str());
113 113
114 //Assign an object to the source code 114 //Assign an object to the source code
115 PyObject *pySource = PyString_FromString(classname.c_str()); 115 PyObject *pySource = PyString_FromString(classname.c_str());
116 116
117 //Import it as a module into the py interpreter 117 //Import it as a module into the py interpreter