60 PyObject* pFunc = PyObject_GetAttrString(
m_PyWizard, aMethod );
62 if( pFunc && PyCallable_Check( pFunc ) )
64 PyObject*
result = PyObject_CallObject( pFunc, aArglist );
66 if( PyErr_Occurred() )
69 wxMessageBox( PyErrStringWithTraceback(),
70 _(
"Exception on python footprint wizard code" ),
71 wxICON_ERROR | wxOK );
83 wxString msg = wxString::Format(
_(
"Method '%s' not found, or not callable" ), aMethod );
84 wxMessageBox( msg,
_(
"Unknown Method" ), wxICON_ERROR | wxOK );
302 int len = aValues.size();
306 PyObject* py_list = PyList_New( len );
308 for(
int i = 0; i < len; i++ )
310 wxString& str = aValues[i];
311 PyObject* py_str = PyUnicode_FromString( (
const char*) str.mb_str() );
312 PyList_SetItem( py_list, i, py_str );
317 arglist = Py_BuildValue(
"(i,O)", aPage, py_list );
319 Py_DECREF( arglist );
wxString result
Test unit parsing edge cases and error handling.