Categories
How to run cmd as environment?
I 'm looking for a library capable of running a command line in a process without killing it . Here's an example of what's needed:
venv = CMDENV() venv.execute('cd /') venv.execute('dir') venv.close()
Answer the question
In order to leave comments, you need to log in
You need to run cmd in a normal process, redirecting cmd's stdin and stdout to pipes that you will control from python. See:
import os import subprocess help(subprocess.Popen) help(os.pipe)
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question