if __name__ != "__main__":
print("Bu program sadece bağımsız olarak çalışabilir!\nÇıkış yapıldı...")
quit()
import pyttsx3 as pyt
import os
from datetime import datetime
import time
# import vlc
import random
import cv2
from pynput import keyboard
q = datetime.now()
zaman = datetime.ctime(q)
zaman = zaman.replace(zaman[12:15], "")
zaman = zaman[4:]
engine = pyt.init()
voices = engine.getProperty('voices') # getting details of current voice
engine.setProperty('voice', voices[0].id) # changing index, changes voices. o for male
engine.setProperty("rate", 175)
engine.setProperty("volume", 1)
print("Hi! I'm Olric\t\t\t\t\t\t\t\t\t\t\t", zaman)
engine.say("hi I'm Olric\n\n")
engine.runAndWait()
try:
while True:
şey = input("")
şey = şey.lower()
şey = şey.replace(" ", "").replace(" ", "")
if şey == "q":
quit()
elif şey == "what'syourname" or şey == "what'syourname":
engine.say("Olric")
print("olric")
engine.runAndWait()
continue
elif şey == "whichlanguageprograme":
engine.say("python")
print("python")
engine.runAndWait()
elif şey == "whattimeisit" or "whattimeisit" in şey or şey == "whatdateistoday" or "whatdateistoday" in şey:
engine.say("showing on the right. Are you stupid?")
print("Showing on the right")
engine.runAndWait()
elif şey == "cmd" or "cmd" in şey:
engine.say("ok")
print(os.startfile("cmd.exe"))
engine.runAndWait()
engine.runAndWait()
elif şey == "howareyou" or "howareyou" in şey:
engine.say("I'm good")
print("I'm good")
engine.runAndWait()
elif "calculator" in şey or şey == "calculator":
print("Calculator is opening")
os.startfile(r"Calc.exe")
engine.say("calculator is opening")
elif şey == "youtube" or "opentheyoutube" in şey:
import os
engine.say("youtube is opening")
print("youtube is opening")
engine.runAndWait()
os.system(r"C:\Users\toshiba\Desktop\YouTube.lnk")
continue
elif şey == "yazbel" or "yazbel" in şey:
import webbrowser as wb
engine.say("opens")
print("opens")
engine.runAndWait()
url = "https://yazbel.com"
wb.open(url)
elif şey == "epicgames" or "epicgames" in şey or "downloadthegame" in şey or "downloadgame" in şey:
os.startfile("epicgames.exe")
elif şey == "call":
engine.say("what should I call")
engine.runAndWait()
soru = input("what should I call? ")
import webbrowser as wb
url = f"https://www.google.com/search?q={soru}&oq=gs&aqs=chrome..69i57l2j69i59l2j69i61j69i60l3.519j0j4&sourceid=chrome&ie=UTF-8"
wb.open(url)
elif "call" in şey:
söz = şey[:]
söz = söz.replace("call", "")
import webbrowser as wb
url = f"https://www.google.com/search?q={söz}&oq=gs&aqs=chrome..69i57l2j69i59l2j69i61j69i60l3.519j0j4&sourceid=chrome&ie=UTF-8"
wb.open(url)
except FileNotFoundError:
print("sistem belirtilen dosyayı bulamıyor")
Ben yukarıdaki kodu pycharmda çalıştırdığımda sürekli şu hatayı alıyorum:
“ImportError: No system module ‘pywintypes’ (pywintypes39.dll)”.
Lakin kodu IDLE’da çalıştırdığımda herhangi bir sıkntı yaşanmıyor.
Bu sorunu nasıl çözebilirim?