Re: Crear un timer!

Chema Cortes <[email protected]>
Newsgroups gmane.comp.python.general.castellano
Message-ID <[email protected]>
El 1 de septiembre de 2009 09:27, Marcos García<[email protected]> escribió:
> Hola a todos!
> Me he iniciado hace poco con Python y parece bastante fácil, sin embargo
> ahora me viene un problema.
>
> Tengo una clase mainWindow, en la que entre otras, tengo una función que
> quiero que sea ejecutada cada X segundos (pongamos 10).
>
> ¿Cómo hago?

Depende un poco del GUI estés usando. Con wxpython podrías usar
wx.Timer (<http://wiki.wxpython.org/Timer>). Si buscas una solución
independiente del GUI, lo normal es tener un hilo que dispare la
función (<http://docs.python.org/library/threading.html#timer-objects>)
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.