11#Version:
2- #0.6.1
3- ###
4- from ast import Num
5- import os ### Librairie
6- import csv ### .py & Librairie
7- import random ### Librairie
8- import webbrowser ### Librairie
9- import tkinter .font as font
10- from tkinter import * ### Librairie
11- from settings import * ### .py
12- from language_modules import * ### .py
13- ###
14- Language = [] #List (will contain the words)
15- NumberOfWord = 0 #The number of the word in the list (DataBase.csv)
16- GitHub = "https://github.com/Hidden-Warden/MyCards/blob/main/README.md" #Link to GitHub ;D
17- Last_Random = - 1
18- Last_Random_List = []
19- ListScrennshot = []
20- ###
21- with open ("DataBase.csv" , encoding = 'utf-8' , newline = '' ) as csvfile :
22- BaseDeMots = list (csv .reader (csvfile ,delimiter = s_delimiter ))
23- Rappel_CSV_Title = BaseDeMots [0 ]
24- Rappel_CSV_Title .pop (0 )
25- print ("Rappel_CSV_Title" ,Rappel_CSV_Title )
2+ #0.7.0
263###
4+ import os ### Librairie #4
5+ import csv ### .py & Librairie #5
6+ import random ### Librairie #6
7+ import webbrowser ### Librairie #7
8+ import tkinter .font as font ### Librairie #8
9+ from tkinter import * ### Librairie #9
10+ from settings import * ### .py #10
11+ from language_modules import * ### .py #11
12+
13+ ##///DEF\\\##
14+
2715def language (input_language ):
2816 ##Choice of the language from the settings:
2917 global Language
@@ -90,7 +78,6 @@ def GitHubLink():
9078 if True :
9179 webbrowser .open (GitHub )
9280### Keyborad shortcuts
93-
9481def Randm (x ):
9582 Randow_Word ()
9683def Nxt (x ):
@@ -105,7 +92,6 @@ def IMG_Next(x):
10592 ImageNext ()
10693def IMG_Back (x ):
10794 ImageBack ()
108-
10995###
11096def Update (Numéro ):
11197 # Update the window content with the new word
@@ -224,16 +210,6 @@ def Update(Numéro):
224210 canvas .create_text ((s_screen_width / scnd_colonne ), (640 ), text = BaseDeMots [Numéro ][7 ],fill = s_font_color , font = s_font_family ) ##7
225211####
226212
227- #Start- Check if the folder exists
228- path0 = "Screenshots"
229- isExist = os .path .exists (path0 )
230- if False == isExist : # If the folder does not exist, create it
231- os .makedirs (path0 )
232- print ("Directory created successfully" ) # If the folder is created successfully, print this message
233- else :
234- print ("Directory already created" )
235- #End
236-
237213######### Images #########
238214def ImageRelated ():
239215 global ListScrennshot
@@ -293,8 +269,7 @@ def ImageRelated():
293269 canvas .create_image ()
294270 Activated = True
295271 return Activated
296- ### End of ImageRelated()
297-
272+ ### End of ImageRelated()
298273def ImageNext ():
299274 global ImageNum
300275 global Activated
@@ -312,7 +287,7 @@ def ImageNext():
312287 canvas .create_image ()
313288 else :
314289 ImageRelated ()
315-
290+ ### End of ImageNext()
316291def ImageBack ():
317292 global ImageNum
318293 global Activated
@@ -330,9 +305,38 @@ def ImageBack():
330305 canvas .create_image ()
331306 else :
332307 ImageRelated ()
308+ ### End of ImageBack()
333309######### Images #########
334310
311+ ##///END_DEF\\\##
312+
313+
314+ ##///MAIN\\\##
315+ Language = [] #List (will contain the words)
316+ NumberOfWord = 0 #The number of the word in the list (DataBase.csv)
317+ GitHub = "https://github.com/Hidden-Warden/MyCards/blob/main/README.md" #Link to GitHub ;D
318+ Last_Random = - 1
319+ Last_Random_List = []
320+ ListScrennshot = []
335321###
322+ with open ("DataBase.csv" , encoding = 'utf-8' , newline = '' ) as csvfile :
323+ BaseDeMots = list (csv .reader (csvfile ,delimiter = s_delimiter ))
324+ Rappel_CSV_Title = BaseDeMots [0 ]
325+ Rappel_CSV_Title .pop (0 )
326+ print ("Rappel_CSV_Title" ,Rappel_CSV_Title )
327+ ###
328+
329+ #Start- Check if the folder exists
330+ path0 = "Screenshots"
331+ isExist = os .path .exists (path0 )
332+ if False == isExist : # If the folder does not exist, create it
333+ os .makedirs (path0 )
334+ print ("Directory created successfully" ) # If the folder is created successfully, print this message
335+ else :
336+ print ("Directory already created" )
337+ #End
338+
339+ ##
336340root = Tk ()
337341root .title ("MyCards" )
338342root .iconbitmap ("MyCards.ico" )
0 commit comments