Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/archivo.py
diff options
context:
space:
mode:
authorYader Velásquez <yajosev@gmail.com>2011-02-01 22:02:08 (GMT)
committer Yader Velásquez <yajosev@gmail.com>2011-02-01 22:02:08 (GMT)
commit307971bb5757a88b368d31ba698fbf3851707ecd (patch)
tree5534a8099f6d64bd5c1792f1cdc53d7762517924 /archivo.py
parent4c60122f53a1823964d795a65ea4ef9a5cf7d39e (diff)
new fuction for mark the days of the calendar
Diffstat (limited to 'archivo.py')
-rw-r--r--archivo.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/archivo.py b/archivo.py
index d3726ce..b913cfa 100644
--- a/archivo.py
+++ b/archivo.py
@@ -96,8 +96,6 @@ def guardar_efemeride(path, file_name):
current_text = current_text[:j] + '\n' + current_text[j + 1 :]
current_id = lines[i][0 : 8]
di[current_id] = current_text
- _log.debug(di)
- _log.debug(type(path))
file_new = open(path, 'wb')
pickle.dump(di,file_new)
file_new.close()
@@ -136,3 +134,25 @@ def borrar_dato(indice, indice_lista, path):
pickle.dump(dia, f)
f.flush()
f.close()
+
+def lista_meses(path):
+ path = path + '/data/lista_dias.pkl'
+
+ meses = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'ago', 'sep',
+ 'oct', 'nov', 'dec']
+
+ if not os.path.exists(path):
+ _log.debug('THE FILE LISTA_DIAS DID NOT EXISTS')
+ f = open(path, 'wb')
+ datos = {}
+ for i in meses:
+ datos[i] = []
+ pickle.dump(datos, f)
+
+ else:
+ f = open(path, 'rb + wb')
+ datos = pickle.load(f)
+ f.seek(0)
+ f.flush()
+ f.close()
+ return datos