Last active
December 21, 2018 04:06
-
-
Save ayutaz/d9d057430db936c95b4a725a4348cd26 to your computer and use it in GitHub Desktop.
GUI(tkinter)を使い,時刻を表示する No.1 ref: https://qiita.com/ayousanz/items/3022f58caef6b131bac9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ウインドウを作成し,時刻を出力する.このときに出力する時刻は,更新しないものとする. | |
from datetime import datetime | |
import tkinter | |
from tkinter import font | |
from time import sleep | |
root=tkinter.Tk() | |
root.title("timer") | |
today_time=datetime.now() | |
root.geometry("400x300") | |
label1 = tkinter.Label(root, text=today_time) | |
label1.pack(side="top") | |
font1 = font.Font(family='Helvetica', size=30, weight='bold') | |
root.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment