不解释,直接上代码。
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: haow
#
# Created: 08/07/2013
# Copyright: (c) haow 2013
# Licence: <your licence>
#-------------------------------------------------------------------------------
import os
def checkwav(filename):
extension = filename[-3:]
if extension == 'wav':
return True
else:
return False
def execute(command):
print command
os.popen(command)
def assemble(filename,lamepath):
dquotaion="\""
space=" "
slash="\\"
quality="-h -V 0 --preset insane"
lamepath = lamepath
filewav = dquotaion+filename+dquotaion
filemp3 = dquotaion+filename[:-3]+"mp3"+dquotaion
command = lamepath+space