Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- ##################################################
- # Progran: ALL MP3s to WAV #
- # Version: 0.1 #
- # Company: 6ft Dan(TM) #
- # Author : Daniel P. Clark #
- # Date : <= 2005 #
- # E-mail : #
- # ABOUT : converts mp3s #
- ##################################################
- import sys, os, string
- Mpg123 = "/usr/bin/mpg123" # creates variable for mpg123 program
- mylist = []
- def menu():
- global mylist
- directory="." # for now, the current directory
- mylist = os.listdir(directory) # get list of files in current directory
- for x in range(len(mylist)):
- if string.lower(mylist[x][-3:]) != "mp3":
- continue
- else:
- mpFile = os.path.join(directory, mylist[x])
- wavFile = mpFile[:-4] + ".wav"
- os.system(Mpg123 + " -w \"" + wavFile + "\" \"" + mpFile + "\"")
- sys.exit()
- if __name__ == '__main__':
- while 1:
- menu() # Run the program!
Add Comment
Please, Sign In to add comment