Created
October 2, 2018 02:59
-
-
Save roaet/4ec1f42e81788c96446de6937958af59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..... | |
stdoutPipe = subprocess.PIPE # line 722 of Gardener.py | |
stderrPipe = subprocess.PIPE | |
if platform.platform().lower().startswith('windows'): | |
if printerrKey in commandDict and commandDict[printerrKey]: | |
stdoutPipe = None | |
else: | |
stderrPipe = None | |
import shlex # move to top of course | |
command = shlex.split(command) | |
process = subprocess.Popen(command, shell=True, stdout=stdoutPipe, stderr=stderrPipe) | |
if platform.platform().lower().startswith('windows'): | |
# Windows has issues with the normal way we're getting the lines from the output. | |
# os.fstat() always reports the pipe has a size of 0. | |
# file.readline() waits for a lotp of lines to be ready. | |
# For some reason, iter() doesn't have this problem. | |
if printerrKey in commandDict and commandDict[printerrKey]: | |
printPipe = process.stderr | |
....... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment