Advertisement
miamondo

rtc.py

Dec 14th, 2021
1,178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.54 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. #Copyright © 2021 Benoît Boudaud https://miamondo.org/contact
  4. #This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
  5. # License as published by the Free Software Foundation, either version 3 of the License, or any later version.
  6.  
  7. #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  8. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  9. # You should have received a copy of the GNU General Public License along with this program.
  10. # If not, see <http://www.gnu.org/licenses/>
  11.  
  12. # ----------------------------------------------------------------------------------------------------------------------
  13.  
  14. import tkinter as tk
  15.  
  16. # ----------------------------------------------------------------------------------------------------------------------
  17.  
  18. root = tk.Tk()
  19. label = tk.Label(
  20.     root,
  21.     font="14",
  22.     justify="left",
  23.     padx=10,
  24.     pady=10,
  25.     text="Attention! L'ordinateur va\ns'éteindre dans cinq minutes.\n\
  26. Enregistrez vos documents.")
  27. label.grid(row=0, column=0)
  28.  
  29. button = tk.Button(
  30.     root,
  31.     bg="red",
  32.     command=root.destroy,
  33.     fg="white",
  34.     font="14",
  35.     padx=10,
  36.     pady=10,
  37.     text="OK")
  38. button.grid(row=1, column=0, padx=5, pady=5, sticky="news")
  39.  
  40. # ----------------------------------------------------------------------------------------------------------------------
  41.  
  42. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement