C
C#3y ago
Dropps

Python to CS entrypoint

how can i compile a python package into a dll or so and use it withhin c# ? or have both languages coexisting?
9 Replies
Angius
Angius3y ago
IronPython maybe Or just calling Py scripts from C#
Korbah
Korbah3y ago
for a past project I invoked Python scripts through the executable using Process.Start
Dropps
DroppsOP3y ago
its more about having a python module (image converter and some more advanced stuff with image manipulation automated) but using it in a C# file so i can say
using App.SomePythonModule;
...
SomePythonModule pythonmodule = new();
pythonmodule.SomeMethodInThere();
...
using App.SomePythonModule;
...
SomePythonModule pythonmodule = new();
pythonmodule.SomeMethodInThere();
...
Thinker
Thinker3y ago
Unless you find some magic Python to IL converter, that's not possible
Dropps
DroppsOP3y ago
ah allright then ima just rewrite 7 packages i use in py to C# and my python code to C# then it should work :WishMeLuck: ah no nitro anymore still thanks alot for your help
Thinker
Thinker3y ago
I mean you can try using IronPython, but you'll never be able to fully use Python modules as if there were C# classes.
Dropps
DroppsOP3y ago
yes thats what i kinda need to achive
Thinker
Thinker3y ago
You could also try checking out ImageSharp if you need advanced image manipulation
Dropps
DroppsOP3y ago
need to create a BitMap from an video file repeatenly for each frame and then well process it to remove any kind of epileptic screen contents i want to create a filter against those basicly or i just let someone else do it from my team xD
Want results from more Discord servers?
Add your server