Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an Python interface #48

Open
ihedvall opened this issue Nov 23, 2023 · 6 comments
Open

Create an Python interface #48

ihedvall opened this issue Nov 23, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ihedvall
Copy link
Owner

Simply create a Python interface similar to the C# interface.

@ihedvall ihedvall added the enhancement New feature or request label Nov 28, 2023
@ihedvall
Copy link
Owner Author

Looks like pybind11 is a more controlled way of doing the interface. Compared to SWIG.

@ihedvall ihedvall self-assigned this Jan 7, 2024
@ihedvall
Copy link
Owner Author

ihedvall commented Jan 27, 2024

I have done a pybind11 python interface in the DBC library as a pybind11 test run. A python interface for the MDF library can now be done fast.

So far, nobody have required a Python interface for the MDF library, why I put this enhancement into low priority. If anyone needs an interface, please let me know.

@CarlesAB
Copy link

Hello,

Could you please guide me to the folder where to find this Python pybind11 interface? Is it possible to load the MDF4Reader.dll/MDF4Writer.dll as COM objects?

Thanks for the help.

@ihedvall
Copy link
Owner Author

The python interface is done if anyone wants it. It should be strait forward but it's still some (2-3) weeks work with the pybind11 interface. I did a training mission on the DBC library as it is smaller than the MDF library. Do you want me to do the Python interface ?

There is no COM interface for the MDF library but there is a .NET assembly available (mdflibrary.dll). It is build by using the Visual Studio IDE (vcproj/sln). This interface is rarely used and manually maintained. The other libraries use CMAKE. In theory, it is possible to create a COM interface but it's a lot of work to support this type of legacy interface. Excel do still use VB script (COM). Please let me know if a COM interface is a requirement.

@CarlesAB
Copy link

Hello,

If it’s not too much trouble and if it’s already developed, I would appreciate a Python interface.

I don’t require a COM interface. I’m curious about the location of mdflibrary.dll. If I can load this library in Python using the .dll file, it might be sufficient for me to start building something. If not, C# might be a more convenient choice. Thank you.

@ihedvall
Copy link
Owner Author

OK, I will finalize the Python interface by using pybind11. There is an older 2.1 release in GitHub. The executable is an installation kit that includes the .NET assembly. According to Google it should work to load an assembly into Python but this might be in the twilight zone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants