Skip to content

Instantly share code, notes, and snippets.

@miawgogo
Created March 13, 2016 16:22
Show Gist options
  • Select an option

  • Save miawgogo/f7e0ec5bce6264f6df58 to your computer and use it in GitHub Desktop.

Select an option

Save miawgogo/f7e0ec5bce6264f6df58 to your computer and use it in GitHub Desktop.
import subprocess
cmd = 'irsend LIST "" ""'
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
tmp = proc.stdout.read()
print tmp
ntmp = tmp.replace("irsend: ", "")
device = ntmp.split("\r\n")
print device
for thing in device:
print thing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment