Eastern Standard Tribe
![]() |
Review:Not Doctorow's best book. |
![]() |
Review:Not Doctorow's best book. |
Y... este no lo estoy haciendo solo, lo que lo hace más divertido.
Es un administrador de eBooks (o de libros en general?) que te ayuda a tener tus PDF/Mobi/FB2/loquesea organizados, y debería eventualmente sincronizarlos con el dispositivo que querés usar para leerlos.
¿Qué funciona? ¡Mirá el video!
Por si eso no tiene sentido para vos:
Podés bajar libros de FeedBooks. Esos libros se descargan, se agregan a la base de datos, se etiquetan, se baja la tapa, etc. etc.
Podés importar tu carpeta actual de libros en bulto
Aranduka usa google y otros servicios para tratar de adivinar (por los nombres) qué libro es ese y llenar los datos extra.
Podés "adivinar" esos datos extra
Marcando como confiables algunos datos (por ejemplo, el título) Aranduka busca candidatos que coincidan y elegís el correcto.
Por supuesto que también se puede editar los datos manualmente.
Y eso es todo por ahora. Features planeados:
Muchos como para hacer una lista.
La meta es clara:
Debe ser hermoso (y no lo es)
Debe ser potente (y todavía no)
Debe ser mejor que la "competencia"
Si no se logran esas tres metas, es un fracaso. Tal vez sea un fracaso divertido, pero igual es fracasar.
Este es un ejemplo que te muestra suficiente para usar progressbar
:
progress = ProgressBar()
for i in progress(range(80)):
time.sleep(0.01)
Sí, eso es todo, tenés una linda barra de progreso ASCII que cruza la terminal, soporta que la cambies de tamaño y se mueve mientras iterás de 0 a 79.
El módulo progressbar
incluso tiene cosas mejores como ETA o velocidades de transferencia, y todo es así de fácil.
¿Ese código... no está bueno? ¿Querés una barra de progreso para ese loop? ¡Lo "envolvés" y listo! Y por supuesto, como yo programo con PyQt, quiero que PyQt tenga algo igual de bueno.
Así se ve el resultado:
Esto lo podés hacer con cualquier toolkit, y probablemente deberías. Tiene un feature extra: podés interrumpir la iteración, y este es el (poco) código:
# -*- coding: utf-8 -*-
import sys, time
from PyQt4 import QtCore, QtGui
def progress(data, *args):
it=iter(data)
widget = QtGui.QProgressDialog(*args+(0,it.__length_hint__()))
c=0
for v in it:
QtCore.QCoreApplication.instance().processEvents()
if widget.wasCanceled():
raise StopIteration
c+=1
widget.setValue(c)
yield(v)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
# Do something slow
for x in progress(xrange(50),"Show Progress", "Stop the madness!"):
time.sleep(.2)
Diviértanse!
![]() |
Review:A real page turner. Taking advantage of it being CC, I think I may attempt translating it to spanish (argentinian flavour) |
Hell yeah! It has been a lot of work but it's out at http://revista.python.org.ar
Some articles:
PyAr, The History
from gc import commonsense - Finish Him!
Painless Concurrency: The multiprocessing Module
Introduction to Unit Testing with Python
Taint Mode in Python
Applied Dynamism
Decorating code (Part 1)
Web2Py for Everybody
It's available in pretty much every format anyone can read, and if your favourite is not there, we will make it for you or may I be smote by the flying spaghetti monster's noodly appendage!
AFAIK there is no other Python magazine being published (feel free to correct me), so it's kind of a big thing for us in PyAr (the Argentina Python community) that we are doing one, and in two languages.
But why stop here? Want it to be available in your language? Contact us at revistapyar@netmanagers.com.ar it may be doable!
And of course, very soon there will be a call for articles for Issue 2, and trust me: that one's going to be epic: this one was just a warmup.