On Thu, 17 Jun 2010 18:03:53 +0200 Jesús Genicio wrote: > if __name__ == "__main__": > try: > a = App() > gobject.timeout_add( 1000, a.imprime) > gtk.main() > except KeyboardInterrupt: > pass > > Y me da la temperatura una vez, pero ya no más.
Veamos la documentación: http://library.gnome.org/devel/pygobject/stable/glib-functions.html#function-glib--timeout-add "The function is called repeatedly until it returns FALSE, at which point the timeout is automatically destroyed and the function will not be called again." Es decir, sólo tienes que hacer un "return True" al final de "imprime". > [adjuntos grandecitos] No soy administrador de la lista, pero diría que es preferible subir código e imágenes a servicios externos y enlazar (especialmente si son imágenes) arnau _______________________________________________ Python-es mailing list [email protected] http://mail.python.org/mailman/listinfo/python-es FAQ: http://python-es-faq.wikidot.com/
