Created
January 31, 2011 00:16
-
-
Save alextp/803463 to your computer and use it in GitHub Desktop.
Avisa a pessoa para alongar o pescoço
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
#!/usr/bin/env python | |
# coding: utf-8 | |
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
import time | |
class Avisa(object): | |
def __init__(self): | |
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) | |
self.window.connect("delete_event", lambda *x: False) | |
self.window.connect("destroy", lambda *x: gtk.main_quit()) | |
self.window.set_border_width(10) | |
self.button = gtk.Button("Alongue agora!\n\n\n(clique para sair)") | |
self.button.connect_object("clicked", gtk.Widget.destroy, self.window) | |
self.window.add(self.button) | |
self.button.show() | |
self.window.show() | |
self.window.fullscreen() | |
gtk.main() | |
while True: | |
h = Avisa() | |
minutos = 40 | |
time.sleep(minutos*60) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment