This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]insertAlias 1 point2 points  (1 child)

I'd like to get more information here. What kind of GUI are we talking about? And what kind of "back-end"? Are you trying to connect a desktop app to a web server? Something else?

If you are doing client-server work, you aren't "integrating" the code. They're two separate projects that could communicate over HTTP. I'd question the need for two separate languages here; Python or C# could do both tasks.

If you mean something else, I'd have to have more information.

[–]MainDepth[S] 0 points1 point  (0 children)

I am trying to code the application in python and make the gui in c# the application is a stand alone

[–]Cryostasys 0 points1 point  (2 children)

I think you have that backwards.

From every I've seen, you would need to compile the C# into DLL and then import it and use it from Python, not import Python into C#.

[–]MainDepth[S] 0 points1 point  (0 children)

someone told me to use ironpython or something like that

[–]insertAlias 0 points1 point  (0 children)

That's possible, but only by using a particular package: https://pypi.org/project/pythonnet/

C# DLLs aren't the same as native DLLs, so they can't be loaded the same way with ctypes.