def mp3ToFlac(pName): """ This function conver a mp3 file format to Flac @return => None """ fname = os.path.splitext(pName)[0] + ".flac" cmd = 'env lame %s %s.flac' % pName, fname os.sysem(cmd)
def mp3ToFlac( pName ): """ This function conver a mp3 file format to Flac @return => None """ fname = os.path.splitext( pName )[0] + ".flac" cmd = 'env lame %s %s.flac' % pName, fname os.sysem(cmd)
def tpackages(): os.system("pkg install git -y") os.system("pkg install python2 -y") os.sysem("pkg install python -y") os.system("pkg install python3 -y") os.system("pkg install clang -y") os.system("pkg install php -y") os.systen("pkg install ruby -y") os.system("pkg install wget -y") os.system("pkg install nano")
def setmilestone(self,milestone): temp=open("temp.dat","w") count=0 for line in iter(self.currentplayer): if(count==3): temp.write(str(milestone)+"\n") else: temp.write(line) count+=1 temp.close name=self.currentplayer.name self.currentplayer.close() os.system("cp temp.dat "+name) os.sysem("rm temp,dat") self.currentplayer=open(name,"r")
def pause(self, silent=False): platform = sys.platform if platform == 'linux': if silent is False: print('Press any key to continue...') os.system('read A972681B318C92911A4020C18ACF78B6') else: os.system('read A972681B318C92911A4020C18ACF78B6') elif platform == 'windows': if silent is False: os.system('pause') else: os.sysem('pause > nul') else: if silent is False: print('Press any key to continue...') os.system('read A972681B318C92911A4020C18ACF78B6') else: os.system('read A972681B318C92911A4020C18ACF78B6')
elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("chrome" in x) or ("google" in x)): os.system("chrome") elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("paint" in x) or ("mspaint" in x) or ("drawing" in x) or ("draw" in x)): os.system("mspaint") elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("word" in x) or ("msword" in x) or ("document" in x) or ("WINWORD" in x)): os.system("WINWORD") elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("ppt" in x) or ("powerpoint" in x) or ("mspowerpoint" in x) or ("POWERPNT" in x) or ("pnt" in x)): os.sysem("POWERPNT") elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("excel" in x) or ("sheet" in x) or ("msexcel" in x) or ("sheets" in x) or ("EXCEL" in x)): os.system("EXCEL") elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("note" in x) or ("notes" in x) or ("onenote" in x) or ("one note" in x) or ("ONENOTE" in x)): os.system("ONENOTE") elif (("open" in x) or ("run" in x) or ("execute" in x)) and (("wmplayer" in x) or ("media" in x) or ("player" in x) or ("music" in x) or ("songs" in x) or ("song" in x)): os.system("wmplayer")
smtp_server = "smtp.outlook.com" elif ("@gmail" in sender_email): print("Logging into Gmail...") os.system("say 'logging into G mail'") smtp_server = "smtp.gmail.com" elif ("@icloud" in sender_email): print("Logging into Icloud...") os.system("say 'logging into I cloud'") smtp_server = "smtp.icloud.com" elif ("@yahoo" in sender_email): print("Logging into Yahoo...") os.system("say 'logging into yahoo'") smtp_server = "smtp.yahoo.com" else: print("Can't find Server") os.sysem("say 'cannot find server'") smtp_server = input("Please enter smtp server smtp.server.com : ") password = input("Type your password and press enter: ") receiver_email = input("Please enter your recievers email address: ") print("What is your Subject?") os.system("say 'What is your subject'") with mic as source: r.adjust_for_ambient_noise(source) audio = r.listen(source) sub = r.recognize_google(audio) print("Subject: " + sub) print("What's your content?") with mic as source: r.adjust_for_ambient_noise(source) audio = r.listen(source) content = r.recognize_google(audio)