How to call a c# script inside a python script

Asked

Viewed 59 times

0

Good morning,

I did a lot of research and found that it was possible to fire a python process inside c#, my question is whether it is possible to do it the other way around, that is to fire a c# execution inside a python script

I thank anyone who can help

1 answer

1


Yes, when you say "execution of C#" that is to say "a program written in C#", correct?
After all, C# is only one language. An executable program (which can be written in any other language) can be executed like this in python:

import os
os.system("processo.exe")
  • in that case it is not necessary to create executable of the code right? and how do I pass arguments?

  • in the call itself, so os.system("processo.exe -parametro=valor1"), ou assim tb com variáveis os.system("process.exe -parameter={variable}")`

  • Thank you very much & #Xa;one last question the code doesn’t need to be compiled, does it? and that as he said in process.EXE I was thoughtful of how to compile the code of c#

  • yes you need to compile the code first, to ensure it has no errors and generate the executable from C#

Browser other questions tagged

You are not signed in. Login or sign up in order to post.