Advertisement
soheil_bozorgkhou

K&S Program v1.2

Jul 26th, 2017
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 33.14 KB | None | 0 0
  1. #in the name of GOD
  2. #For Using This Program You Need "wget","talkey","clipboard" and "mss" libraries
  3. #pip3 install wget , pip3 install talkey , pip3 install clipboard , pip3 install mss
  4.  
  5. from mss import mss
  6. from vocabulary.vocabulary import Vocabulary as vb
  7. import math
  8. import time
  9. import wget
  10. import random
  11. import socket
  12. import urllib
  13. import clipboard
  14. import sys
  15.  
  16.  
  17.  
  18. def is_number(s):
  19.      try:
  20.          float(s)
  21.          return True
  22.        
  23.      except:
  24.          return False
  25.  
  26.  
  27.  
  28.  
  29.  
  30. def ttss():
  31.      try:          
  32.           import talkey
  33.           tts = talkey.Talkey(
  34.                         engine_preference=['espeak'],
  35.                        
  36.                         espeak={
  37.  
  38.                             'options': {
  39.                                 'enabled': True,
  40.                             },
  41.  
  42.  
  43.                             'defaults': {
  44.                                     'words_per_minute': 183,
  45.                                    
  46.                             },
  47.  
  48.                          
  49.                             'languages': {
  50.                                 'en': {
  51.                                     'voice': 'english-mb-en1',
  52.                                     'words_per_minute': 183
  53.                                 },
  54.                             }
  55.                         }
  56.                     )
  57.           return True
  58.  
  59.  
  60.      
  61.      except:
  62.           return False
  63.      
  64.  
  65.  
  66. gel = ttss()
  67.  
  68.  
  69. if gel == True:
  70.                import talkey
  71.                tts = talkey.Talkey(
  72.                         engine_preference=['espeak'],
  73.                        
  74.                         espeak={
  75.  
  76.                             'options': {
  77.                                 'enabled': True,
  78.                             },
  79.  
  80.  
  81.                             'defaults': {
  82.                                     'words_per_minute': 183,
  83.                                    
  84.                             },
  85.  
  86.                          
  87.                             'languages': {
  88.                                 'en': {
  89.                                     'voice': 'english-mb-en1',
  90.                                     'words_per_minute': 183
  91.                                 },
  92.                             }
  93.                         }
  94.                     )
  95.  
  96.                count = 0
  97.                print ("Welcome To K&S Program\nFor Help Please Type \"help\" And For More Information Please Type \"credits\" Or \"license\"")  
  98.                tts.say("welcome to K and S program. for help please type help and for more information please type credits or license")
  99.  
  100.  
  101.                while count < 5:
  102.                      
  103.                   print ("==>")
  104.                   u = input ()
  105.  
  106.  
  107.                    
  108.                   if u == "download" or u == 'Download' or u == "DOWNLOAD":
  109.                      def internet():
  110.                               try:
  111.                                     urllib.request.urlopen ('http://ipecho.net/plain')
  112.                                     return True
  113.                               except:
  114.                                     return False
  115.                                        
  116.                      
  117.                      if internet() == True:
  118.                         tts.say("please type the download link If You Copied The Download Link Please Type paste")
  119.                         file_url = input('Please Type The Download Link(If You Copied The Download Link Please Type \"paste\"):')
  120.                         text = clipboard.paste()
  121.                         if file_url == "paste":
  122.                                 filename = wget.download(text)
  123.                         else:
  124.                             if file_url.isspace() == True:
  125.                                 filename = wget.download(file_url)
  126.                             else:
  127.                                print("You Entered An Unknown link\n")
  128.                                tts.say("you entered an unknown link")
  129.                      else:
  130.                         print ("You Are Not Connected To The Internet")
  131.                         tts.say("you are not connected to the internet")
  132.  
  133.                        
  134.                      
  135.                   elif u == 'source' or u == 'Source' or u == "SOURCE":
  136.                       print ("\nPlease Go To https://pastebin.com/bm77buLv To See The Source Code\n")
  137.  
  138.  
  139.                      
  140.                   elif u == 'time' or u == 'Time' or u =="TIME":
  141.                      localtime = time.asctime( time.localtime(time.time()) )
  142.                      print ("Local current time :", localtime)
  143.                      tts.say("local current time is")
  144.                      tts.say (localtime)
  145.  
  146.  
  147.                   elif u == 'dic' or u == "dictionary":
  148.                         def internet():
  149.                                  try:
  150.                                          urllib.request.urlopen ('http://ipecho.net/plain')
  151.                                          return True
  152.                                  except:
  153.                                          return False
  154.                        
  155.                         if internet() == True:
  156.                            print ("Welcome To The Dictionary\nPlease Type \"syn\" For Synonym \nType \"mean\" For Meaning Of The Word\nType \"ant\" For Antonyms Of The Word\nAnd Type \"exa\" To See A Quick Example On How To Use The Word")
  157.                            print ("Please Type Your Command:")
  158.                            tts.say ("please enter your command")
  159.                            diccom = input ()
  160.                            if diccom == 'syn':
  161.                                 print ("Please Enter The Word:")
  162.                                 tts.say ("please enter the word")
  163.                                 dicword = input()
  164.                                 print (vb.synonym(dicword))
  165.                            elif diccom == 'mean':
  166.                                 print ("Please Enter The Word:")
  167.                                 tts.say ("please enter the word")
  168.                                 dicword = input()
  169.                                 print (vb.meaning(dicword))
  170.                            elif diccom == "ant":
  171.                                 print ("Please Enter The Word:")
  172.                                 tts.say ("please enter the word")
  173.                                 dicword = input()
  174.                                 print (vb.antonym(dicword))
  175.                            elif diccom == "exa":
  176.                                 print ("Please Enter The Word:")
  177.                                 tts.say ("please enter the word")
  178.                                 dicword = input()
  179.                                 print (vb.usage_example(dicword))
  180.                            else:
  181.                                 print ("Your Command Is Incorrect")
  182.                                 tts.say ("your command is incorrect")
  183.  
  184.                         elif netvar == False:
  185.                            print ("You Are Not Connected To The Internet")
  186.                            tts.say ("you are not connected to the internet")
  187.  
  188.  
  189.  
  190.                   elif u == 'game' or u == 'Game' or u == "GAME":
  191.                         ii =random.randint(1,10)
  192.                         print("Welcome To The Guess The Number Game\nYou Should Guess A Number Between 1 And 10\n You Have 3 Chances To Guess\n")
  193.                         tts.say ("welcome to guess the number game you should guess a number between 1 and 10 you have three chances to guess")
  194.                         print ("Please Enter Your First Guess:")
  195.                         tts.say ("please type your first guess")
  196.                         pp = input()
  197.                         if is_number(pp) == True:
  198.                            
  199.                                  if int(pp) == int(ii):
  200.                                       print("Excellent You Won!!!!!\n")
  201.                                       tts.say ("excellent you won")
  202.                                  else:
  203.                                       if int(pp) > int(ii):
  204.                                                 print ("Your Nmuber Is Greater Than Our Number")
  205.                                                 tts.say ("your number is greater than our number")
  206.                                       else:
  207.                                            print ("Your Number Is Smaller Than Our Number")
  208.                                            tts.say ("your number is smaller than our number")
  209.                                       print ("Please Enter Your Second Guess:")
  210.                                       tts.say ("please enter your second guess")
  211.                                       oo = input()
  212.                                       if is_number(oo) == True:
  213.                                             if int(oo) == int(ii):
  214.                                                 print ("Excellent You Won!!!!!!!\n")
  215.                                                 tts.say ("excellent you won")
  216.                                             else:
  217.                                                       if int(oo) > int (ii):
  218.                                                            print ("Your Nmuber Is Greater Than Our Number")
  219.                                                            tts.say ("your number is greater than our number")
  220.                                                       else:
  221.                                                            print ("Your Number Is Smaller Than Our Number")
  222.                                                            tts.say ("your number is smaller than our number")
  223.                                                       print ("Please Enter Your Last Guess:")
  224.                                                       tts.say ("please enter your last guess")
  225.                                                       uuu = input()
  226.                                                       if is_number (uuu) == True:  
  227.                                                             if int(uuu) == ii:
  228.                                                                       print ("Excellent You Won!!!!!!\n")
  229.                                                                       tts.say ("excellent you won")
  230.                                                             else:
  231.                                                                       print ("GAME OVER!!!")
  232.                                                                       tts.say ("game over")
  233.                                                                       print ("The Number Was",ii)
  234.                                                                       tts.say ("the number was")
  235.                                                                       tts.say (str (ii))
  236.                                                       else:
  237.                                                          print ("Please Enter A Number And Nothing Else")
  238.                                                          tts.say ("please enter a number and nothing else")
  239.                                       else:
  240.                                          print ("Please Enter A Number And Nothing Else")
  241.                                          tts.say ("please enter a number and nothing else")
  242.                         else:
  243.                            print ("Please Enter A Number And Nothing Else")
  244.                            tts.say ("please enter a number and nothing else")
  245.  
  246.  
  247.                            
  248.  
  249.                   elif u == "convert" or u == "Convert" or u == 'CONVERT':
  250.                      print ("\nPlease Type \"c\" For Converting Centigrade To Fahrenheit And Type \"f\" For Conerting Fahrenheit To Centigrade:")
  251.                      tts.say("please type C for converting centigrade to fahrenheit and type F for converting fahrenheit to centigrade")
  252.                      con = input()
  253.                      if con == 'c' or con == "C":
  254.                         print ("Please Enter The Number:")
  255.                         tts.say ("Please Enter The Number")
  256.                         tobe = input()
  257.                         if is_number(tobe) == True:
  258.                               iu = int(tobe)*1.8+32
  259.                               print (tobe,"Centigrade = ",iu,"Fahrenheit")
  260.                               tts.say(str(tobe))
  261.                               tts.say("Centigrade")
  262.                               tts.say("Is equal to")
  263.                               tts.say(str(iu))
  264.                               tts.say("fahrenheit")
  265.                         else:
  266.                             print("Please Enter A Number And Nothing Else")
  267.                             tts.say("please enter a number and nothing else")
  268.                  
  269.                      elif con == 'f' or con == "F":
  270.                         print ("Please Enter The Number:")
  271.                         tts.say("Please Enter The Number:")
  272.                         tobe = input()
  273.                         if is_number(tobe) == True:
  274.                               iu = (int(tobe)-32)/8
  275.                               print (tobe,"Fahrenheit = ",iu,"Centigrade")
  276.                               tts.say(str(tobe))
  277.                               tts.say("fahrenheit")
  278.                               tts.say("Is equal to")
  279.                               tts.say(str(iu))
  280.                               tts.say("centigrade")
  281.                         else:
  282.                             print("Please Enter A Number And Nothing Else")
  283.                             tts.say("please enter a number and nothing else")      
  284.                      else:
  285.                         print ("Your Command Is Incorrect")
  286.                         tts.say("your command is incorrect")
  287.  
  288.  
  289.  
  290.                        
  291.                        
  292.                   elif u == 'tts' or u == "Tts" or u == "TTS":
  293.                      ttsvar = input ("Please Enter Your Text:")      
  294.                      tts.say(ttsvar)
  295.  
  296.  
  297.                   elif u == "screenshot" or u == 'scrshot' or u == 'Screenshot' or u == 'SCREENSHOT' or u == "Scrshot" or u == 'SCRSHOT':
  298.                     with mss() as sct:
  299.                        sct.shot()
  300.                        print ("The Screenshot Picture Saved")
  301.                        tts.say ("the screenshot picture saved")
  302.  
  303.                   elif u == "credits":
  304.                       print ("\n2016-2017 Soheil And Kamyar\nsoheilmokhe@gmail.com\n")
  305.                       tts.say ("Soheil And Kamyar")
  306.  
  307.                      
  308.                      
  309.                   elif u == "help" or u == 'Help' or u == 'HELP':
  310.                       print ("\nTo Run Calculator Please Type \"calc\"\nTo See Credits Type \"credits\"\nTo See The Local Current Time Please Type \"time\"\nTo Downlaod Something Via K&S Please Type \"download\"\nTo See The Source Code Please Type \"source\"\nTo Use The Text To Speech Please Type \"tts\"")
  311.                       print ("To Use Convert Tool To Convert Centigrade To Fahrenheit Or Fahrenheit To Centigrade Please Type \"convert\"")
  312.                       print ("To Take A Screen Shot From Your Desktop Please Type \"scrshot\"")
  313.                       print ('To Run Guess The Number Game Please Type \"game\"')
  314.                       print ("For Using Dictionary Please Type \"dic\"")
  315.                       print ("To See Your Public IP Address Please Type \"ip\"\nTo Close The Program Please Type \"close\"\n")
  316.                      
  317.  
  318.  
  319.                   elif u == 'close' or u == "Close" or u == "CLOSE":
  320.                      exit()
  321.  
  322.  
  323.                                  
  324.  
  325.                   elif u == 'ip' or u == 'IP' or u == "Ip":
  326.                      def internet():
  327.                               try:
  328.                                   urllib.request.urlopen ("http://ipecho.net/plain")
  329.                                   return True
  330.                               except:
  331.                                   return False
  332.                      
  333.                      if internet() == True:
  334.                         fp = urllib.request.urlopen("http://ipecho.net/plain")
  335.                         mybytes = fp.read()
  336.                         mystr = mybytes.decode("utf8")
  337.                         fp.close()
  338.                         print("\nYour Public IP Address:",mystr)
  339.                         tts.say("your public i p address is")
  340.                         tts.say(mystr)
  341.                      else:
  342.                         print("You Are Not Connected To The Internet")
  343.                         tts.say("you are not connected to the internet")
  344.  
  345.  
  346.  
  347.                        
  348.                   elif u == "license":
  349.                      print ("You Can Do Whatever You Want  With This Program And Its Sourcecode :D")
  350.                      tts.say ("you can do whatever you want with this program and its source code")
  351.  
  352.  
  353.  
  354.                   elif u == "calc" or u == 'Calc' or u == "CALC":
  355.                       print ("\nCalculator Version 1.0\nPlease Enter Your Operator (+,-,/,*,**,#,cos,sin,tan,acos,acosh,asin,atan,ceil,floor,factorial) :")
  356.                       tts.say("Please Type Your Operator")
  357.                       x = input()
  358.                       if x == '+':
  359.                            print ("Please Enter Your First Number:")            
  360.                            tts.say("Please enter your first number")
  361.                            y = input()
  362.                            if is_number(y) == True:
  363.                              
  364.                                print ("Please Enter Your Second Number:")            
  365.                                tts.say("Please enter your second number")
  366.                                z = input ()
  367.                                if is_number(z) == True:
  368.                                  
  369.                                    c = int(y) + int(z)
  370.                                    print ("Your Number Is:",c)          
  371.                                    tts.say("your number is")
  372.                                    tts.say (str(c))
  373.                                else:
  374.                                   print("Please Enter A Number And Nothing Else")
  375.                                   tts.say("please enter a number and nothing else")
  376.                                
  377.  
  378.                            else:
  379.                               print("Please Enter A Number And Nothing Else")
  380.                               tts.say("please enter a number and nothing else")
  381.                              
  382.                       elif x == '-':
  383.                            print ("Please Enter Your First Number:")            
  384.                            tts.say("Please enter your first number")
  385.                            y = input()
  386.                            if is_number(y) == True:
  387.                              
  388.                                print ("Please Enter Your Second Number:")            
  389.                                tts.say("Please enter your second number")
  390.                                z = input ()
  391.                                if is_number(z) == True:
  392.                                    c = int(y) - int(z)
  393.                                    print ("Your Number Is:",c)          
  394.                                    tts.say("your number is")
  395.                                    tts.say (str(c))
  396.                                else:
  397.                                   print("Please Enter A Number And Nothing Else")
  398.                                   tts.say("please enter a number and nothing else")
  399.                                
  400.  
  401.                            else:
  402.                               print("Please Enter A Number And Nothing Else")
  403.                               tts.say("please enter a number and nothing else")
  404.                            
  405.                       elif x == '*':
  406.                            print ("Please Enter Your First Number:")            
  407.                            tts.say("Please enter your first number")
  408.                            y = input()
  409.                            if is_number(y) == True:
  410.                              
  411.                                print ("Please Enter Your Second Number:")            
  412.                                tts.say("Please enter your second number")
  413.                                z = input ()
  414.                                if is_number(z) == True:
  415.                                    c = int(y) * int(z)
  416.                                    print ("Your Number Is:",c)          
  417.                                    tts.say("your number is")
  418.                                    tts.say (str(c))
  419.                                else:
  420.                                   print("Please Enter A Number And Nothing Else")
  421.                                   tts.say("please enter a number and nothing else")
  422.                                
  423.  
  424.                            else:
  425.                               print("Please Enter A Number And Nothing Else")
  426.                               tts.say("please enter a number and nothing else")
  427.                            
  428.                       elif x == '/':
  429.                            print ("Please Enter Your First Number:")            
  430.                            tts.say("Please enter your first number")
  431.                            y = input()
  432.                            if is_number(y) == True:
  433.                              
  434.                                print ("Please Enter Your Second Number:")            
  435.                                tts.say("Please enter your second number")
  436.                                z = input ()
  437.                                if is_number(z) == True:
  438.                                    c = int(y) / int(z)
  439.                                    print ("Your Number Is:",c)          
  440.                                    tts.say("your number is")
  441.                                    tts.say (str(c))
  442.                                else:
  443.                                   print("Please Enter A Number And Nothing Else")
  444.                                   tts.say("please enter a number and nothing else")
  445.                                
  446.  
  447.                            else:
  448.                               print("Please Enter A Number And Nothing Else")
  449.                               tts.say("please enter a number and nothing else")
  450.                            
  451.                       elif x == '#':
  452.                            print ("Please Enter Your Number:")            
  453.                            tts.say("Please Enter your number")
  454.                            y = input()
  455.                            if is_number(y) == True:
  456.                               z = int (y)
  457.                               c = math.sqrt (z)
  458.                               print ("Your Number Is:",c)
  459.                               tts.say("your number is")
  460.                               tts.say (str(c))
  461.                            else:
  462.                               print("Please Enter A Number And Nothing Else")
  463.                               tts.say("please enter a number and nothing else")
  464.                            
  465.                       elif x == '**':
  466.                            print ("Please Enter Your First Number:")            
  467.                            tts.say("Please enter your first number")
  468.                            y = input()
  469.                            if is_number(y) == True:
  470.                              
  471.                                print ("Please Enter Your Second Number:")            
  472.                                tts.say("Please enter your second number")
  473.                                z = input ()
  474.                                if is_number(z) == True:
  475.                                    c = int(y) ** int(z)
  476.                                    print ("Your Number Is:",c)          
  477.                                    tts.say("your number is")
  478.                                    tts.say (str(c))
  479.                                else:
  480.                                   print("Please Enter A Number And Nothing Else")
  481.                                   tts.say("please enter a number and nothing else")
  482.                            else:
  483.                               print("Please enter a number and nothing else")
  484.                               tts.say("please enter a number and nothing else")
  485.                              
  486.                       elif x == 'cos':
  487.                            print ("Please Enter Your Number:")            
  488.                            tts.say("Please Enter your number")
  489.                            y = input()
  490.                            if is_number(y) == True:
  491.                               z = int (y)
  492.                               c = math.cos(z)
  493.                               print ("Your Number Is:",c)
  494.                               tts.say("your number is")
  495.                               tts.say (str(c))
  496.                            else:
  497.                               print("Please Enter A Number And Nothing Else")
  498.                               tts.say("please enter a number and nothing else")
  499.                              
  500.                       elif x == "sin":
  501.                            print ("Please Enter Your Number:")            
  502.                            tts.say("Please Enter your number")
  503.                            y = input()
  504.                            if is_number(y) == True:
  505.                               z = int (y)
  506.                               c = math.sin(z)
  507.                               print ("Your Number Is:",c)
  508.                               tts.say("your number is")
  509.                               tts.say (str(c))
  510.                            else:
  511.                               print("Please Enter A Number And Nothing Else")
  512.                               tts.say("please enter a number and nothing else")
  513.  
  514.                       elif x == 'tan':
  515.                            print ("Please Enter Your Number:")            
  516.                            tts.say("Please Enter your number")
  517.                            y = input()
  518.                            if is_number(y) == True:
  519.                               z = int (y)
  520.                               c = math.tan(z)
  521.                               print ("Your Number Is:",c)
  522.                               tts.say("your number is")
  523.                               tts.say (str(c))
  524.                            else:
  525.                               print("Please Enter A Number And Nothing Else")
  526.                               tts.say("please enter a number and nothing else")
  527.                              
  528.                       elif x == 'acos':
  529.                            print ("Please Enter Your Number:")            
  530.                            tts.say("Please Enter your number")
  531.                            y = input()
  532.                            if is_number(y) == True:
  533.                               z = int (y)
  534.                               c = math.acos(z)
  535.                               print ("Your Number Is:",c)
  536.                               tts.say("your number is")
  537.                               tts.say (str(c))
  538.                            else:
  539.                               print("Please Enter A Number And Nothing Else")
  540.                               tts.say("please enter a number and nothing else")
  541.                              
  542.                       elif x == 'acosh':
  543.                            print ("Please Enter Your Number:")            
  544.                            tts.say("Please Enter your number")
  545.                            y = input()
  546.                            if is_number(y) == True:
  547.                               z = int (y)
  548.                               c = math.acosh(z)
  549.                               print ("Your Number Is:",c)
  550.                               tts.say("your number is")
  551.                               tts.say (str(c))
  552.                            else:
  553.                               print("Please Enter A Number And Nothing Else")
  554.                               tts.say("please enter a number and nothing else")
  555.                              
  556.                       elif x == 'asin':
  557.                            print ("Please Enter Your Number:")            
  558.                            tts.say("Please Enter your number")
  559.                            y = input()
  560.                            if is_number(y) == True:
  561.                               z = int (y)
  562.                               c = math.asin(z)
  563.                               print ("Your Number Is:",c)
  564.                               tts.say("your number is")
  565.                               tts.say (str(c))
  566.                            else:
  567.                               print("Please Enter A Number And Nothing Else")
  568.                               tts.say("please enter a number and nothing else")
  569.                              
  570.                       elif x == 'atan':
  571.                            print ("Please Enter Your Number:")            
  572.                            tts.say("Please Enter your number")
  573.                            y = input()
  574.                            if is_number(y) == True:
  575.                               z = int (y)
  576.                               c = math.atan(z)
  577.                               print ("Your Number Is:",c)
  578.                               tts.say("your number is")
  579.                               tts.say (str(c))
  580.                            else:
  581.                               print("Please Enter A Number And Nothing Else")
  582.                               tts.say("please enter a number and nothing else")
  583.                              
  584.                       elif x == 'ceil':
  585.                            print ("Please Enter Your Number:")            
  586.                            tts.say("Please Enter your number")
  587.                            y = input()
  588.                            if is_number(y) == True:
  589.                               z = int (y)
  590.                               c = math.ceil(z)
  591.                               print ("Your Number Is:",c)
  592.                               tts.say("your number is")
  593.                               tts.say (str(c))
  594.                            else:
  595.                               print("Please Enter A Number And Nothing Else")
  596.                               tts.say("please enter a number and nothing else")
  597.                              
  598.                       elif x == 'factorial':
  599.                            print ("Please Enter Your Number:")            
  600.                            tts.say("Please Enter your number")
  601.                            y = input()
  602.                            if is_number(y) == True:
  603.                               z = int (y)
  604.                               c = math.factorial(z)
  605.                               print ("Your Number Is:",c)
  606.                               tts.say("your number is")
  607.                               tts.say (str(c))
  608.                            else:
  609.                               print("Please Enter A Number And Nothing Else")
  610.                               tts.say("please enter a number and nothing else")
  611.                              
  612.                       elif x == 'floor':
  613.                            print ("Please Enter Your Number:")            
  614.                            tts.say("Please Enter your number")
  615.                            y = input()
  616.                            if is_number(y) == True:
  617.                               z = int (y)
  618.                               c = math.floor(z)
  619.                               print ("Your Number Is:",c)
  620.                               tts.say("your number is")
  621.                               tts.say (str(c))
  622.                            else:
  623.                               print("Please Enter A Number And Nothing Else")
  624.                               tts.say("please enter a number and nothing else")
  625.                              
  626.                       else :
  627.                            print ("Your Operator Is Incorrect")
  628.                            tts.say("your operator is incorrect")
  629.  
  630.                  
  631.  
  632.                   else :
  633.                      print ("I Think Your Command Is Incorrect For Help Please Type \"help\"")
  634.                      tts.say("I Think Your Command Is Incorrect For Help Please Type help.")
  635.  
  636. elif gel == False:
  637.      def internet():
  638.              try:
  639.                      urllib.request.urlopen ("http://ipecho.net/plain")
  640.                      return True
  641.              except:
  642.                      return False
  643.      print ("ERORR:For Using This Program You Need To Have A Text To Speech Engine Like eSpeak\nIf You Are A Linux User You Can Download And Install eSpeak By This Command:\nsudo apt-get install espeak")
  644.      print ( "If You Are A Windows User You Can Download eSpeak From http://espeak.sourceforge.net/download.html \nOr You Can Download eSpeak From This Program (2.5 MBytes)\nDo You Want Download eSpeak From This Program (y/n)?:")
  645.      pof = input()
  646.      if pof == 'y' or pof == 'Y':
  647.             if internet() == True:
  648.                       print ("Starting Download..")
  649.                       print ("Downloading File....")
  650.                       hh = "http://sourceforge.net/projects/espeak/files/espeak/espeak-1.48/setup_espeak-1.48.04.exe"
  651.                       filename = wget.download(hh)
  652.                       print ("The setup_espeak-1.48.04.exe File Downloaded. Please Run And Install Downloded File And Reopen The K&S Program")
  653.                       doncomp = input()
  654.             else:
  655.                  print ("You Are Not Connected To The Internet.Please Connect To The Internet To Download The File")
  656.                      
  657.      else:
  658.             exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement