Created
May 4, 2016 07:55
-
-
Save ccfiel/3b4a6b657bdb6a837e2790877d2a2b4f to your computer and use it in GitHub Desktop.
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 Tkinter import * | |
from PIL import Image, ImageTk | |
import os | |
import datetime | |
class App(object): | |
def __init__(self): | |
self.root = Tk() | |
self.id_number = "" | |
self.root.attributes('-zoomed', True) | |
self.name_label = Label(self.root, text="Juan, De la Cruz") | |
self.level_label = Label(self.root, text="Grade 6") | |
self.section_label = Label(self.root, text="Diligence") | |
self.id_number_label = Label(self.root, text="09-2303423") | |
self.time_label = Label(self.root, text="**********") | |
self.status_label = Label(self.root, text="ONLINE/Anglicum Learning Center/SY2016/IN/v12") | |
self.id_number_label.grid(row=0, sticky=E) | |
self.name_label.grid(row=1, sticky=E) | |
self.level_label.grid(row=2, sticky=E) | |
self.section_label.grid(row=3, sticky=E) | |
self.status_label.grid(row=4, sticky=E) | |
self.time_label.grid(row=5, sticky=E) | |
self.image = Image.open("{0}/default.png".format(os.path.dirname(os.path.abspath(__file__)))).resize((600, 600)) | |
self.photo = ImageTk.PhotoImage(self.image) | |
self.label = Label(image=self.photo) | |
self.label.image = self.photo | |
self.label.grid(row=0, column=2, rowspan=6) | |
self._poll_job_id = self.poll() | |
def poll(self): | |
self.time_label.config(text=datetime.datetime.now().strftime('%b %d, %Y %I:%M:%S %p')) | |
self._poll_job_id = self.root.after(500, self.poll) | |
app = App() | |
app.root.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment