I know that to access any dll from python one should use ctypes. Till now I haven't been able to get it working (I tried both declarations to initialize). Problem that I think is that the dll uses a lot of #define and its own custom structures, of which I couldn't find the definition in ctypes.
I can't see how to go exactly using ctypes, is my problem justified or I missed to see something really important. Also if anybody can guide me about what documentation or book to refer to, it would be great.
While going through some forum I also came across idea of building my own modules in C/C++ for python, will it be a good idea for my displayed algorithm (this is what I use in my C++ code).
Expand|Select|Wrap|Line Numbers
- #define important_parameter MODULE_NUM
- custom_struct *mystruct;
- mythread(threadid,.. etc)
- {
- custom_class::update_data_to_external_device(mystruct, ..);
- }
- int main (void)
- {
- custom_class::initialize(important_parameter, *custom_struct);
- do
- {
- key = my_key_detect_func();
- switch (key)
- {
- case 1:
- //update struct for condition 1;
- break;
- case 2:
- //update struct for condition 2;
- }
- }while(key!=quit)
- custom_class::shutdown(important_parameter, *custom_struct);
- }
thanks for replying in advance