I'm trying to create a windows form application using C# but run existing python code within it. I currently have my entire program working in python code, but would like to use the functions I created in Python within my C# Windows Form Application. For example (keeping this very basic) let's say I have a label on my form called "label". Then I have a variable, x per say that's equal to 5. And a python functions that returns the string "True" if the passed in value is 5. Ideally I'd like to be able to say:
label.Text = PYTHONFUNCTION(x);
which would then run the python function and since x is 5 return the string "True" to the C# code and display it on the label. Is this at all possible, and if so how? Thanks in advance for the help!
Aucun commentaire:
Enregistrer un commentaire