Skip to content

Instantly share code, notes, and snippets.

@MaZderMind
Created November 3, 2022 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaZderMind/20441b7d7a3027c5318b59158bb2f30f to your computer and use it in GitHub Desktop.
Save MaZderMind/20441b7d7a3027c5318b59158bb2f30f to your computer and use it in GitHub Desktop.
Apple Compressor Hangs
# https://support.apple.com/en-gb/guide/compressor/cpsr9be73312/4.6.1/mac/11.5.1
import subprocess
proc = subprocess.Popen(['/Applications/Compressor.app/Contents/MacOS/Compressor', '-monitor'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL)
while True:
c = proc.stdout.read(1)
print(c) # prints up to the last '\n'
# never gets here
print('done')
# also just hangs forever
# subprocess.check_output(['/Applications/Compressor.app/Contents/MacOS/Compressor', '-monitor'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment