#!/usr/bin/env python import cgi, os import cgitb; cgitb.enable() import subprocess f = cgi.FieldStorage() p = f.getvalue("p", "Bump.mp3") p = os.path.join("voice", p) out = subprocess.check_output(["mpv", p], cwd="/media/floppy/noweb", stderr=subprocess.STDOUT) # print "Location: /index.html" # print print "Content-type:text/html; charset=utf-8" print print """ """