File tree Expand file tree Collapse file tree 2 files changed +31
-8
lines changed Expand file tree Collapse file tree 2 files changed +31
-8
lines changed Original file line number Diff line number Diff line change
1
+ import tkinter
2
+ from time import strftime
3
+
4
+ top = tkinter .Tk ()
5
+ top .title ('Digital Clock' )
6
+ # 0,0 makes the window non-resizable
7
+ top .resizable (0 ,0 )
8
+
9
+ def time ():
10
+ # %p defines AM or PM
11
+ string = strftime ('%H: %M: %S %p' )
12
+ clockTime .config (text = string )
13
+ clockTime .after (1000 , time )
14
+
15
+ clockTime = tkinter .Label (top , font = ('courier new' , 40 ),
16
+ background = 'red' ,foreground = 'black' )
17
+ clockTime .pack (anchor = 'center' )
18
+ time ()
19
+ top .mainloop ()
Original file line number Diff line number Diff line change 1
1
# Python Scripts
2
2
3
- # Script 1 - Turtle Graphics
3
+ ## Script 1 - Turtle Graphics
4
4
5
5
Code using turtle graphics
6
6
TurtleGraphics.py
7
7
8
- # Script 2 - Popup Window
8
+ ## Script 2 - Popup Window
9
9
10
10
Displaying a popup window
11
11
DisplayPopupWindow.py
12
12
13
- # Script 3 - Take a break
13
+ ## Script 3 - Take a break
14
14
15
15
Python code to take a break while working long hours
16
16
TakeABreak.py
17
17
18
- # Script 4 - Chessboard
18
+ ## Script 4 - Chessboard
19
19
20
20
Create a chesboard using matplotlib
21
21
ChessBoard.py
22
22
23
- # Script 5 - Font Art
23
+ ## Script 5 - Font Art
24
24
25
25
Display a font art using python
26
26
FontArt.py
27
27
28
- # Script 6 - Video Downloader
28
+ ## Script 6 - Video Downloader
29
29
30
30
VideoDownloader.py
31
31
32
- # Script 7 - Fake Profiles
32
+ ## Script 7 - Fake Profiles
33
33
34
34
Get many fake profiles using python
35
- FakeProfile.py
35
+ FakeProfile.py
36
+
37
+ ## Script 8 - Digital Clock
38
+
39
+ DigitalClock.py
You can’t perform that action at this time.
0 commit comments