Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python script to display and play ASX

Name: iox 2006-07-01 1:36

I created this so I could watch adultswim-fix. It uses mplayer, but you can substitute it with any program of your choice.

==Begin Code==

#!/usr/bin/env python
import re,sys,os

file = open(sys.argv[-1],'r')

words = file.read()

stream = re.compile("mms://\w.*wmv")
x=0
streams = stream.findall(words)
for i in streams:
    x+=1
    print str(x)+'.)',i


if streams:
    selection = input("Make a selection ")
else:
    sys.exit()
   
os.system("mplayer -cache 8192 " + str(streams[selection-1]))


==END CODE==

Name: Anonymous 2006-07-06 2:27

Uh, what's sage?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List