To do that, you would have to:
- supply the
shell=True
argument in thesubprocess.Popen
call, and - separate the commands with:
;
if running under a *nix shell (bash, ash, sh, ksh, csh, tcsh, zsh etc)&
if running under thecmd.exe
of Windows
More Related Contents:
- How do I hide the console when I use os.system() or subprocess.call()?
- Popen waiting for child process even when the immediate child has terminated
- Python: how to kill child process(es) when parent dies?
- Run Process and Don’t Wait
- Popen with conflicting executable/path
- subprocess: deleting child processes in Windows
- Using subprocess to run Python script on Windows
- How do I get all of the output from my .exe using subprocess and Popen?
- What’s the best way to duplicate fork() in windows?
- Cross-platform subprocess with hidden window
- Python running as Windows Service: OSError: [WinError 6] The handle is invalid
- Run process as admin with subprocess.run in python
- ‘^’ is ignored by Python – how to escape ‘^’ character in Popen Windows?
- How do I eliminate Windows consoles from spawned processes in Python (2.7)? [duplicate]
- Run multiple programs sequentially in one Windows command prompt?
- Python subprocess.Popen as different user on Windows
- Launch IPython notebook with selected browser
- Sending ^C to Python subprocess objects on Windows
- How do I use subprocess.Popen to connect multiple processes by pipes?
- ImageMagick not authorized to convert PDF to an image
- How do you get a directory listing sorted by creation date in python?
- Python subprocess.call a bash alias
- How do I install pip on Windows?
- Why does Python’s multiprocessing module import __main__ when starting a new process on Windows?
- Python and Windows Named Pipes
- Imported module not found in PyInstaller
- How to use “/” (directory separator) in both Linux and Windows in Python?
- how to kill (or avoid) zombie processes with subprocess module
- No Module Named ‘_pywrap_tensorflow_internal’
- WindowsError [error 5] Access is denied