From hiramhzr at gmail.com Sat Mar 12 14:30:32 2016 From: hiramhzr at gmail.com (Hiram) Date: Sat, 12 Mar 2016 19:30:32 +0000 Subject: [Python-mx] Cambiar valor de etiqueta pyqt4 Message-ID: Hola buenas tardes, estoy intentando cambiar el valor de una etiqueta en tiempo de ejecuci?n cada "n" tiempo, ac? pongo un ejemplo lo que intento hacer hasta ahora con este c?digo me tira el siguiente error: "AttributeError: 'function' object has no attribute 'lBD'" Dejo el c?digo: #!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui from PyQt4 import QtCore import time import threading class leerSubidas(threading.Thread): def __init__(self, parent): threading.Thread.__init__(self) self.parent = parent def run(self): while(True): self.parent.saludar() time.sleep(5) class init(QtGui.QMainWindow): def __init__(self): super(init, self).__init__() self.upCount = leerSubidas(self) self.upCount.daemon = True self.upCount.start() self.initGui() def initGui(self): self.saludo = QtGui.QLabel('Cambio:', self) self.saludo.resize(self.width(), 50) self.saludo.move(120, 10) self.lBD = QtGui.QLabel('1', self) self.lBD.resize(self.width(), 50) self.lBD.move(145, 80) self.setGeometry(300, 300, 300, 160) self.setWindowTitle('Cambio valor de etiqueta') self.show() def saludar(self): print('Si entre') self.initGui.lBD.setText('Hola') def main(): app = QtGui.QApplication(sys.argv) ex = init() sys.exit(app.exec_()) if __name__ == '__main__': main() Espero alguien me pueda orientar con esto, desde ya muchas gracias. hiram -------------- next part -------------- An HTML attachment was scrubbed... URL: From nnieto at noenieto.com Sat Mar 12 15:20:30 2016 From: nnieto at noenieto.com (Noe Nieto) Date: Sat, 12 Mar 2016 12:20:30 -0800 Subject: [Python-mx] Cambiar valor de etiqueta pyqt4 In-Reply-To: References: Message-ID: Ah? tienes. #!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui import time import threading from datetime import datetime class MyThread(threading.Thread): def __init__(self, app_instace): threading.Thread.__init__(self) self.app_instace = app_instace def run(self): while(True): self.app_instace.saludar() time.sleep(5) class MyQtApp(QtGui.QMainWindow): def __init__(self): super(MyQtApp, self).__init__() self.initGui() self.counter = 0 self.cntr_thread = MyThread(self) self.cntr_thread.daemon = True self.cntr_thread.start() def initGui(self): self.saludo = QtGui.QLabel('Cambio:', self) self.saludo.resize(self.width(), 50) self.saludo.move(120, 10) self.lBD = QtGui.QLabel('1', self) self.lBD.resize(self.width(), 50) self.lBD.move(145, 80) self.setGeometry(300, 300, 300, 160) self.setWindowTitle('Cambio valor de etiqueta') self.show() def saludar(self): self.lBD.setText( '%s Hola: %i' % (datetime.now().strftime('%X'), self.counter) ) self.counter += 1 def main(): app = QtGui.QApplication(sys.argv) ex = MyQtApp() sys.exit(app.exec_()) if __name__ == '__main__': main() -- Noe 2016-03-12 11:30 GMT-08:00 Hiram : > Hola buenas tardes, estoy intentando cambiar el valor de una etiqueta en > tiempo de ejecuci?n cada "n" tiempo, ac? pongo un ejemplo lo que intento > hacer hasta ahora con este c?digo me tira el siguiente error: "AttributeError: > 'function' object has no attribute 'lBD'" > > Dejo el c?digo: > > #!/usr/bin/python > # -*- coding: utf-8 -*- > > import sys > from PyQt4 import QtGui > from PyQt4 import QtCore > import time > import threading > > class leerSubidas(threading.Thread): > def __init__(self, parent): > threading.Thread.__init__(self) > self.parent = parent > > def run(self): > while(True): > self.parent.saludar() > time.sleep(5) > > class init(QtGui.QMainWindow): > def __init__(self): > super(init, self).__init__() > self.upCount = leerSubidas(self) > self.upCount.daemon = True > self.upCount.start() > self.initGui() > > def initGui(self): > self.saludo = QtGui.QLabel('Cambio:', self) > self.saludo.resize(self.width(), 50) > self.saludo.move(120, 10) > > self.lBD = QtGui.QLabel('1', self) > self.lBD.resize(self.width(), 50) > self.lBD.move(145, 80) > > self.setGeometry(300, 300, 300, 160) > self.setWindowTitle('Cambio valor de etiqueta') > self.show() > > def saludar(self): > print('Si entre') > self.initGui.lBD.setText('Hola') > > def main(): > app = QtGui.QApplication(sys.argv) > ex = init() > sys.exit(app.exec_()) > > if __name__ == '__main__': > main() > > > Espero alguien me pueda orientar con esto, desde ya muchas gracias. > > hiram > > > _______________________________________________ > Python-mx mailing list > Python-mx at python.org > https://mail.python.org/mailman/listinfo/python-mx > > -- --- Noe Nieto NNieto Consulting Services M: nnieto at noenieto.com W: http://noenieto.com T: @tzicatl Li: Perfil en LinkedIn -------------- next part -------------- An HTML attachment was scrubbed... URL: From hiramhzr at gmail.com Sat Mar 12 20:54:50 2016 From: hiramhzr at gmail.com (Hiram) Date: Sun, 13 Mar 2016 01:54:50 +0000 Subject: [Python-mx] Cambiar valor de etiqueta pyqt4 In-Reply-To: References: Message-ID: Perfecto, muchas gracias. El s?b., 12 de mar. de 2016 a la(s) 14:20, Noe Nieto escribi?: > Ah? tienes. > > > > #!/usr/bin/python > # -*- coding: utf-8 -*- > > import sys > from PyQt4 import QtGui > import time > import threading > from datetime import datetime > > class MyThread(threading.Thread): > def __init__(self, app_instace): > threading.Thread.__init__(self) > self.app_instace = app_instace > > def run(self): > while(True): > self.app_instace.saludar() > time.sleep(5) > > class MyQtApp(QtGui.QMainWindow): > def __init__(self): > super(MyQtApp, self).__init__() > self.initGui() > self.counter = 0 > self.cntr_thread = MyThread(self) > self.cntr_thread.daemon = True > self.cntr_thread.start() > > > def initGui(self): > self.saludo = QtGui.QLabel('Cambio:', self) > self.saludo.resize(self.width(), 50) > self.saludo.move(120, 10) > > self.lBD = QtGui.QLabel('1', self) > self.lBD.resize(self.width(), 50) > self.lBD.move(145, 80) > > self.setGeometry(300, 300, 300, 160) > self.setWindowTitle('Cambio valor de etiqueta') > self.show() > > def saludar(self): > self.lBD.setText( > '%s Hola: %i' % > (datetime.now().strftime('%X'), self.counter) > ) > self.counter += 1 > > > def main(): > app = QtGui.QApplication(sys.argv) > ex = MyQtApp() > > sys.exit(app.exec_()) > > if __name__ == '__main__': > main() > > -- > Noe > > 2016-03-12 11:30 GMT-08:00 Hiram : > >> Hola buenas tardes, estoy intentando cambiar el valor de una etiqueta en >> tiempo de ejecuci?n cada "n" tiempo, ac? pongo un ejemplo lo que intento >> hacer hasta ahora con este c?digo me tira el siguiente error: "AttributeError: >> 'function' object has no attribute 'lBD'" >> >> Dejo el c?digo: >> >> #!/usr/bin/python >> # -*- coding: utf-8 -*- >> >> import sys >> from PyQt4 import QtGui >> from PyQt4 import QtCore >> import time >> import threading >> >> class leerSubidas(threading.Thread): >> def __init__(self, parent): >> threading.Thread.__init__(self) >> self.parent = parent >> >> def run(self): >> while(True): >> self.parent.saludar() >> time.sleep(5) >> >> class init(QtGui.QMainWindow): >> def __init__(self): >> super(init, self).__init__() >> self.upCount = leerSubidas(self) >> self.upCount.daemon = True >> self.upCount.start() >> self.initGui() >> >> def initGui(self): >> self.saludo = QtGui.QLabel('Cambio:', self) >> self.saludo.resize(self.width(), 50) >> self.saludo.move(120, 10) >> >> self.lBD = QtGui.QLabel('1', self) >> self.lBD.resize(self.width(), 50) >> self.lBD.move(145, 80) >> >> self.setGeometry(300, 300, 300, 160) >> self.setWindowTitle('Cambio valor de etiqueta') >> self.show() >> >> def saludar(self): >> print('Si entre') >> self.initGui.lBD.setText('Hola') >> >> def main(): >> app = QtGui.QApplication(sys.argv) >> ex = init() >> sys.exit(app.exec_()) >> >> if __name__ == '__main__': >> main() >> >> >> Espero alguien me pueda orientar con esto, desde ya muchas gracias. >> >> hiram >> >> >> _______________________________________________ >> Python-mx mailing list >> Python-mx at python.org >> https://mail.python.org/mailman/listinfo/python-mx >> >> > > > -- > --- > Noe Nieto > NNieto Consulting Services > M: nnieto at noenieto.com > W: http://noenieto.com > T: @tzicatl > Li: Perfil en LinkedIn > _______________________________________________ > Python-mx mailing list > Python-mx at python.org > https://mail.python.org/mailman/listinfo/python-mx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From diego_dast at hotmail.com Thu Mar 10 22:05:21 2016 From: diego_dast at hotmail.com (Diego Sanchez) Date: Thu, 10 Mar 2016 21:05:21 -0600 Subject: [Python-mx] =?iso-8859-1?q?Oferta_de_trabajo_en_Guadalajara=2C_M?= =?iso-8859-1?q?=E9xico?= Message-ID: Que tal, estamos reclutando a una desarrollador en Python y encontr? su sitio, el puesto es para Guadalajara, estar?a excelente si tuvieran algunos referidos aqu?, les anexo la oferta de trabajo.SaludosContrataci?n inmediata, Requisitos:El programador/ingeniero deber? estar familiarizado con los siguientes conceptos o en su caso, la mayor?a de ellos:Proyecto a realizar: Web Crawler, Scrapper o Buscador, se podr? utilizar alg?n framework(p.e Scrapy, PySpider etc.).Habilidades:- Lenguaje en el que se programar?, Python (Si se tiene otra propuesta, comentarla), algun framework como Django etc.- Experiencia en scapper frameworks (Scrapy o PySpider)(opcional)- Experiencia en montaje de servidores LINUX.- Conocimiento de motores OCR, (p.e Tesseract OCR).(Librerias listas para usarse).- Manejo de alg?n pre-procesador de imagenes (p.e imagemagick.org).(Librerias listas para usarse).- Buen manejo de Algoritmos Robustos, buenas t?cnicas etc.- Manejo de alg?n gestor de base de datos (MongoDB, NoSQL etc.).Se montar? un panel administrativo del Crawler en donde se configuren las URL a buscar (Semillas) y los par?metros de b?squeda para cada URL obtenida atraves de la "semilla", con diferentes REGEX.Acerca de ti :- Buena adaptaci?n.- Trabajo en equipo.- Autodidacta.- Capacidad de resolver problemas.Tipo de Puesto: Tiempo completo17,000 - 25,000 salario mensual.Experiencia requerida:Desarrollo de aplicaci?nes en Python y web: 5 a?osIdiomas requeridos:espa?ol -------------- next part -------------- An HTML attachment was scrubbed... URL: