Call ConsoleApp from python

0

Good morning. My problem is that I am trying to call a console application (made in c #) from python, and call the process in the same terminal. So I do not return the termianl to continue typing and in turn the exe of c # is only to listen to a command and write it in a txt document. How do I call that exe but to another terminal? I use the subprocess module of the python3 stlib. In turn subprocess.Popen ("path"). I appreciate your help

    
asked by limg21 05.09.2017 в 03:10
source

1 answer

0

And if you use the module I tell you there is a method called system so you can make any call to the terminal and any operation ** os.system (code) #in string, if you want to execute many commands give spaces or line breaks ** Here's a shortcut I made to go directly to a directory:

     def atajo():
        w = int(input("{a}Ingrese cuantas ventanas quiere{b}:  ".format(a = "<---",b= "-->")))
        a = "AppData\Local\Programs\Python\Python36-32\pythonxd"
        for i in range(w):
          os.system("start cd {}".format(a))

      atajo()
    
answered by 05.09.2017 в 05:25