Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load a C# dll in python?

how can I load a c# dll in python?

Do I have to put some extra code in the c# files? (like export in c++ files)

I don't want to use IronPython. I want to import a module to Python!

like image 232
aF. Avatar asked Jan 16 '10 15:01

aF.


People also ask

Can I refill my AC myself?

You can recharge the system yourself with a charging kit and some refrigerant, as long as your car uses r134a refrigerant. First, you'll need to check for leaks. Then, check the refrigerant pressure and test your system. Finally, you can add your refrigerant and finish the recharge.

Should I recharge my AC myself?

Unless the AC system needs repair, you shouldn't have to recharge it. Using a DIY AC recharge kit may delay a trip to a professional as the problem worsens or make things worse by overcharging.


1 Answers

The package Python for.NET and the Python Implementation IronPython now work the same way.

Example for a C# DLL MyDll.dll:

import clr clr.AddReference('MyDll') from MyNamespace import MyClass my_instance = MyClass() 

See this post for more details.

like image 61
Vincent Avatar answered Sep 22 '22 00:09

Vincent