morphbr@466: import os morphbr@466: import time morphbr@466: import socket morphbr@466: morphbr@466: HOST='localhost' morphbr@466: PORT=5000 morphbr@466: morphbr@466: s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) morphbr@466: s.settimeout(10) morphbr@466: morphbr@466: arq = open('/tmp/dvb.mpg','r') morphbr@466: morphbr@466: mplayer = os.popen("which mplayer").read().strip() morphbr@466: mplayer += " -noidx -" morphbr@466: pin, pout = os.popen2(mplayer) morphbr@466: morphbr@466: s.connect((HOST,PORT)) morphbr@466: i = 0 morphbr@466: morphbr@466: data = s.recv(1024) morphbr@466: while (data != ""): morphbr@466: pin.write(data) morphbr@466: data = s.recv(1024) morphbr@466: