Horá do descanso! Uma peque aplicação que fiz usando pygtk

Publicado por Eros (última atualização em 06/07/2011)

[ Hits: 6.143 ]

Download hora.py




Ai pessoal uma pequena aplicação que fiz em pygtk, que de meia em meia hora exibe uma tela com uma mensagem "ta na hora de descansar". Ótimo pra quem fica no computador e perde a hora na frente do mesmo. uma boa pra lembrar de dar uma pausinha pra ir beber água café e tals. Acho que também serve de dica pra quem ta aprendendo pygtk assim como eu ;)

  



Esconder código-fonte

#!/usr/bin/python
#
# main.py
# Copyright (C) Eros Araújo Alves Reis 2011 <eros.reis@live.com>
# 
# hora is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# hora is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.


#coding: utf-8
#pygtk.require('2.0')
#! /usr/bin/env python
#-*- coding: utf-8 -*-
import pygtk
import gtk
import gobject
minuto = 0

janela = gtk.Window (gtk.WINDOW_TOPLEVEL)   
label  = gtk.Label("Ta na hora de descansar")
janela.add(label)
janela.show_all()

def verificar():
   global minuto
   if (minuto < 30):
      minuto = minuto+1
      janela.hide_all()
   else:
      janela.show_all()
      minuto = 0
   return True   

a = gobject.timeout_add(60000, verificar)

gtk.main()

Scripts recomendados

Simples Login Test com PyGTK

Lista Telefônica (Interface Gráfica)

Janela Basica em Python

Calculadora de IMC

Formatando número de telefone celular (usando .format)


  

Comentários

Nenhum comentário foi encontrado.


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts