def bildirim(): if kullanici_adi == "gitpod": pass elif bellenim_surumu.split('-')[-1] == 'aws': pass elif platform.machine() == "aarch64": pass elif isletim_sistemi == "Windows" and bellenim_surumu >= "10": try: from win10toast import ToastNotifier except: os.system('pip install win10toast') from win10toast import ToastNotifier bildirim = ToastNotifier() bildirim.show_toast(f"{pencere_basligi}", f"{bildirim_metni}", icon_path=None, duration=10, threaded=True) elif isletim_sistemi == "Linux": try: import notify2 except: os.system('pip install notify2') import notify2 notify2.init(pencere_basligi) bildirim = notify2.Notification(f"{pencere_basligi}", f"{bildirim_metni}", "notification-message-im") bildirim.show() else: pass
def bildirim(self): if platform.machine() == "aarch64": return elif self.kullanici_adi == "gitpod": return elif self.bellenim_surumu.split('-')[-1] == 'aws': return elif self.isletim_sistemi == "Windows" and self.bellenim_surumu >= "10": try: from win10toast import ToastNotifier except ModuleNotFoundError: os.system('pip install win10toast') from win10toast import ToastNotifier self.win_baslik bildirim = ToastNotifier() bildirim.show_toast(f"{self.pencere_basligi}", f"{self.bildirim_metni}", icon_path=None, duration=10, threaded=True) elif self.isletim_sistemi == "Linux": try: import notify2 except ModuleNotFoundError: os.system('pip install notify2') import notify2 except Exception as hata: print(type(hata).__name__) return notify2.init(self.pencere_basligi) bildirim = notify2.Notification(f"{self.pencere_basligi}", f"{self.bildirim_metni}", "notification-message-im") bildirim.show()