Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/archivo.py
diff options
context:
space:
mode:
authoryaderv <yajosev@gmail.com>2011-03-08 16:19:01 (GMT)
committer yaderv <yajosev@gmail.com>2011-03-08 16:19:01 (GMT)
commit16de059e0b307e791359842f48ae17b76abf62f3 (patch)
tree8cd5721be9b0c7bd354244dea7d8afc045d1d343 /archivo.py
parent885ff65cb3eb770e45dda36dd130d762a4a36291 (diff)
editar
Diffstat (limited to 'archivo.py')
-rw-r--r--archivo.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/archivo.py b/archivo.py
index e6ec06e..45294de 100644
--- a/archivo.py
+++ b/archivo.py
@@ -106,7 +106,7 @@ def guardar_efemeride(path, file_name):
file_new.close()
archivo.close()
-def guardar_dato(indice, contenido, categoria, entero_cat, bolean, bolean_2, path):
+def guardar_dato(indice, contenido, categoria, entero_cat, bolean, bolean_2, path, indice_lista=False):
'''save the content in a file, add the content to a dictionary->list'''
color_categoria = ['#6E92FF', '#82FF5F', '#FFE251', '#FF7D7D', '#FFFFFF']
@@ -134,13 +134,19 @@ def guardar_dato(indice, contenido, categoria, entero_cat, bolean, bolean_2, pat
else:
color = '#FFFFFF'
- dia[indice].append([contenido, categoria, prioridad, \
+ if indice_lista:
+ indice_lista = str(indice_lista)
+ indice = str(indice)
+ indice_lista = indice_entero(indice_lista)
+ dia[indice][indice_lista] = [contenido, categoria, prioridad, \
+ progreso, color]
+ else:
+ dia[indice].append([contenido, categoria, prioridad, \
progreso, color])
f.seek(0)
pickle.dump(dia, f)
f.close()
-
def borrar_dato(indice, indice_lista, path):
'''delete the selected content'''
path = path + '/data/actividades.pkl'