Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- import time
- p = subprocess.Popen(['/bin/bash', '-c', 'mplayer http://173.239.76.147:8090'],
- stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=False,
- stderr=subprocess.STDOUT)
- time.sleep(5)
- p.kill()
- p = subprocess.Popen(['/bin/bash', '-c', 'mplayer http://173.239.76.147:8090'],
- shell=False)
- time.sleep(5)
- p.kill()
- import subprocess, time
- p = subprocess.Popen(['mplayer', 'http://173.239.76.147:8090'])
- time.sleep(5)
- p.terminate()
- p.wait() # important!
- subprocess.Popen(['reset']).wait()
- print('Hello, World!')
- #!/usr/bin/env python
- import shlex
- import time
- from subprocess import Popen, PIPE
- cmd = shlex.split("mplayer http://www.swissradio.ch/streams/6034.m3u")
- p = Popen(cmd, stdin=PIPE)
- time.sleep(5)
- p.communicate(b'q')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement