Replies: 1 comment
|
Looks like you're getting all 🦗🦗🦗 and no ❤️ here. Here's some examples of how we'd imported the .NET classes in our Stock Indicators for Python library, which similarly wraps an uncoordinated .NET DLL. We're not using a codec for full class objects; at least, not in any proper encode/decode form. One thing to note, the built-in Python.NET codecs don't support all data types, likely only primitives and some other simple types, and not |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello
Background
I am a Python developer using Pythonnet to call a C# DLL from Python. My project currently does not contain any C# source code, and only calls a supplied pre-supplied C# library.
I am using Pythonnet to access
foo.dllfrom Python.foo.dllis an external DLL that I do not have access to the source code to.foo.dllconsists of many custom classes and methods.This makes it awkward to use the library from within Python, since I keep getting opaque class objects as return types. What is particularly cumbersome is figuring out call signatures for class methods.
My understanding is codecs are the solution to this problem. The docs mention codecs, and how some examples of how to implement codecs when calling Python from within C#.
My question
How can I use codecs (or something else?) to transform the C# classes into more ergonomic Python classes?
All reactions