Hello!
I am new with wxPython and have some issues with passing variables of my custom type as argument to Python script.
I successfully built wxPython from sources with my custom type(i.e. I have wxPython + c_customStruct.py/.pyd, embedded sample works)
class wxCustomStruct
{
public:
int intValue;
bool boolValue;
wxString strValue;
wxSize sizeValue;
wxCustomStruct();
void Init();
int GetIntValue() const;
void SetIntValue(int value);
wxSize GetSizeValue() const;
void SetSizeValue(wxSize const &size);
bool GetBoolValue() const;
void SetBoolValue(bool value);
wxString GetStrValue() const;
void SetStrValue(wxString const &value);
wxString ToString() const;
};
But I have two issues:
- When I try to run the following python script with interpreter python.exe
import wx
import wx.c_customStruct
I get the following error:
Traceback (most recent call last):
File “wxPy.py”, line 3, in
import wx.c_customStruct
SystemError: dynamic module not initialized properly
- I don’t understand how can I create an instance of my custom class in C++ and pass it as argument to call of python-function?
Please, give me advice, how to overcome these issues.
Sincerely, Alexei.