+ unify method names
This commit is contained in:
parent
554d3736f9
commit
c81aca0902
|
@ -214,7 +214,7 @@ std::string InterpreterSingleton::runString(const char *sCmd)
|
|||
}
|
||||
}
|
||||
|
||||
Py::Object InterpreterSingleton::runString_returnObject(const char *sCmd)
|
||||
Py::Object InterpreterSingleton::runStringObject(const char *sCmd)
|
||||
{
|
||||
PyObject *module, *dict, *presult; /* "exec code in d, d" */
|
||||
|
||||
|
@ -235,7 +235,7 @@ Py::Object InterpreterSingleton::runString_returnObject(const char *sCmd)
|
|||
throw PyException();
|
||||
}
|
||||
|
||||
return Py::Object(presult, true);
|
||||
return Py::asObject(presult);
|
||||
}
|
||||
|
||||
void InterpreterSingleton::systemExit(void)
|
||||
|
|
|
@ -161,8 +161,8 @@ public:
|
|||
//@{
|
||||
/// Run a statement on the python interpreter and gives back a string with the representation of the result.
|
||||
std::string runString(const char *psCmd);
|
||||
/// Runs a string (expression) and returns object returned by expression.
|
||||
Py::Object runString_returnObject(const char *sCmd);
|
||||
/// Run a statement on the python interpreter and return back the result object.
|
||||
Py::Object runStringObject(const char *sCmd);
|
||||
/// Run a statement on the python interpreter and gives back a string with the representation of the result.
|
||||
void runInteractiveString(const char *psCmd);
|
||||
/// Run file (script) on the python interpreter
|
||||
|
|
|
@ -182,7 +182,7 @@ PyMODINIT_FUNC initPartGui()
|
|||
CreateSimplePartCommands();
|
||||
CreateParamPartCommands();
|
||||
try{
|
||||
Py::Object ae = Base::Interpreter().runString_returnObject("__import__('AttachmentEditor.Commands').Commands");
|
||||
Py::Object ae = Base::Interpreter().runStringObject("__import__('AttachmentEditor.Commands').Commands");
|
||||
Py::Module(partGuiModule).setAttr(std::string("AttachmentEditor"),ae);
|
||||
} catch (Base::PyException &err){
|
||||
err.ReportException();
|
||||
|
|
Loading…
Reference in New Issue
Block a user