Does Python have something similar to .net c# PInvoke? -


Is there anything like some .NET c # PInvoke in CPython?

For example, I have some .dll or something. And so want to register some of its functions on the runtime and start using them in my program.

In C # you can:

  // Using the Marshal.cs system; Using System.Runtime.InteropServices; Namespace CSSRPiters {Class Main Class {{DllImport ("msvcrt.dll") puts public static extern int ([MarshallAs (UnmanagedType.LPStr)] string M); [DllImport ("msvcrt.dll")] Internal Stable Extern int _flushall (); Public static zero main (string [] args) {puts ("Hello World!"); _flushall (); }}}   

Is there a similar functionality of the Python?

Thanks in advance!

You can call function from DLL using Python.

Comments