usr bin env python import subprocess import time if __name__ __main__

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/usr/bin/env python
import subprocess
import time
if __name__ == "__main__":
process = subprocess.Popen("mplayer /home/sanya/Documents/09.mp3", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
process.stdin.write('9'*99)
while process.poll() == None:
process.stdin.write('0')
print process.poll()
time.sleep(1)