-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
43 lines (38 loc) · 1.33 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#--- Notepy - The Python-made Notepad - by Nik ---
#--- Author: Nikos-Nikitas ---
#--- GitHub: nikosnikitas ---
#--- importing our notepy class ---
from notepy import Notepy, NotepyGr
from tkinter import *
from tkinter import messagebox
from tkinter import filedialog as fd
from tkinter import ttk
import os
import webbrowser
#--- function that changes the app's language ---
def changeLang(l=""):
global lang
lang = l
return lang
app = ""
if __name__ == '__main__':
langWin = Tk()
langWin.title("Notepy - The Python-made Notepad")
langWin.geometry("640x480")
langWin.resizable(True, True)
lang = changeLang("")
lbl = Label(langWin, text="Select Language - Επιλογή Γλώσσας")
lbl.pack()
enBtn = Button(langWin, text="English", command = lambda:changeLang("en"))
enBtn.pack()
grBtn = Button(langWin, text="Ελληνικά", command = lambda:changeLang("gr"))
grBtn.pack()
lbl2 = Label(langWin, text="After selection click X to close this window. \n Μετά την επιλογή πατήστε στο Χ για να κλείσετε αυτό το παράθυρο.")
lbl2.pack()
langWin.mainloop()
if lang == "en":
langWin.destroy
app = Notepy()
if lang == "gr":
langWin.destroy
app = NotepyGr()