Advertisement
c0d3dsk1lls

Simple clock in python CodedSkills.net

Aug 4th, 2022 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.82 KB | None | 0 0
  1. ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++##
  2. ##=======================================================================================================================================================================================##
  3. ##----------------------CODEDSKILLS.NET--------------------------------------------------------------------------------------------------------------------------------------------------##
  4. #----CREATE A SIMPLE CLOCK IN PYTHON!!!-------------------CODEDSKILLS.NET---------------------------------------------------
  5. from tkinter import *
  6. from time import *
  7. def update():
  8. #--------------------------------------------
  9.     time_string = strftime("%I:%M:%S %p")
  10.     time_label.config(text=time_string,fg="red")
  11. #--------------------------------------------
  12.     day_string = strftime("%A")
  13.     day_label.config(text=day_string,fg="aqua",bg="blue")
  14. #--------------------------------------------
  15.     date_string = strftime("%B %d, %Y")
  16.     date_label.config(text=date_string,fg="lime")
  17.     window.after(1000,update)
  18. #--------------------------------------------
  19. window = Tk()
  20. #-----------------------------------------------------------------------
  21. time_label = Label(window,font=("Arial",50),fg="#00ff00",bg="black")
  22. time_label.pack()
  23. #-----------------------------------------------------------------------
  24. day_label = Label(window,font=("Ink Free",20),fg="#00ff00",bg="black")
  25. day_label.pack()
  26. #-----------------------------------------------------------------------
  27. date_label = Label(window,font=("Ink Free",30),fg="#00ff00",bg="black")
  28. date_label.pack()
  29. #------------------------------------------------------------------------------------------
  30. update()
  31. window.mainloop()
  32. #------------------------------------------------------------------------------------------
  33. #=================================================================================================
  34. ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++##
  35. ##=================================================================================================================================================##
  36. ##-------------------------------------------------------------------------------------------------------------------------------------------------##
  37. ##                                                                                                                                                 ##
  38. ##                                                                                        ##   //                                                  ##
  39. ##----+-#########\   ########  -+#######\\-- +##########   #######\\        /#######\\    ##  //     ######---+-##      ##       /#######\\        ##
  40. ##      ##-          ##|--|##    ##-     ##   ##           ##-     ##      ||-----        ## //        ##       ##----+-##      ||-----         +--##
  41. ##      ##           ##|  |##  -+##    +--##  #######      ##       ##  -- \\#######\\    ## \\        ##       ##      ##------\\#######\\-------+##
  42. ##      ##-        +-##|--|##    ##-     ##   ##           ##-     ##         ------||    ##  \\       ##       ##      ##         ------||--------##
  43. ##      #########/   ########  -#######//-  -+##########   #######//       \\######//     ##   \\    ######---+-#####   #####   \\######//------+--##
  44. ##                                                                                                                                                 ##
  45. ##                                                          https://CodedSkills.net                                                                ##
  46. ##-------------------------------------------------------------------------------------------------------------------------------------------------##
  47. ##=================================================================================================================================================##
  48. ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++##
  49.  
  50.  
  51. ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++##
  52. ##=======================================================================================================================================================================================##
  53. ##---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------##
  54. ##                                                                                                                                                                                       ##
  55. ##           ###       #######\    #######\       #######       ########     ##  ##     ########     ########       #######     ########       ####        ##         /#######\\         ##
  56. ##          #-##            //          //        \   //    =      ##        ##  ##        ##        ##|--|##       ##  //         ##         //  \\       ##        ||-                 ##
  57. ##            ##          ##\\        ##\\           //            ##        ##  ##        ##        ##|  |##       ###\\          ##        //====\\      ##        \\#######\\         ##
  58. ##            ##            //          //          //             ##        ##  ##        ##        ##|--|##       ##  \\         ##       //      \\     ##                 ||         ##
  59. ##       ##########   ########--  ########--       //       =      ##         ####         ##        ########       ##   \\     ########   //        \\    #######   \\######//          ##
  60. ##                                                                                                                                                                                       ##
  61. ##                                                                         https://1337tutorials.net                                                                                     ##
  62. ##---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------##
  63. ##=======================================================================================================================================================================================##
  64. ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++##
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement