-
-
Save fitoria/344526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def email_to_csv(self, widget, data=None): | |
""" email_to_csv - Exports the e-mail registered in this month to a csv file""" | |
# FIXME: Agregar un FileChooserDialog para elegir donde guardar el archivo csv | |
results = self.database.execute_view("asistencia_mensual", "pizzabashlog") | |
f = open("emails.csv","w") | |
for result in results[[date.today().month]]: | |
# FIXME: Buscar una mejor manera de forzar el salto de línea en el archivo | |
f.writelines(result.value['email'] + '\n') | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment