diff options
author | Yader Velásquez <yajosev@gmail.com> | 2010-09-02 06:31:47 (GMT) |
---|---|---|
committer | Yader Velásquez <yajosev@gmail.com> | 2010-09-02 06:31:47 (GMT) |
commit | bda270ef0c1a7da5c60737b95d9c8f920f7a9e98 (patch) | |
tree | 05be3fea67ce7d844684962240f3b6aded1429c4 | |
parent | 2bd1060eb3b2e539b6b0f5b247f72b1e2c41eaa3 (diff) |
the problem about save a new activity was fixed
-rw-r--r-- | archivo.py | 3 | ||||
-rw-r--r-- | files/actividades.pkl | 11 |
2 files changed, 14 insertions, 0 deletions
@@ -49,7 +49,10 @@ def guardar_dato(indice, contenido): indice = str(indice) f = open('files/actividades.pkl', 'rb+wb') dia = pickle.load(f) + if dia.has_key(indice) is False: + dia[indice] = [] dia[indice].append(contenido) + f.seek(0) pickle.dump(dia, f) #f.flush() f.close() diff --git a/files/actividades.pkl b/files/actividades.pkl index 28049e6..32289d1 100644 --- a/files/actividades.pkl +++ b/files/actividades.pkl @@ -6,4 +6,15 @@ S'nuevo' p3 aS'nuevo' p4 +asS'1283407200' +p5 +(lp6 +S'hola' +p7 +aS'nuevo' +p8 +as. +p4 +aS'probando\n' +p5 as.
\ No newline at end of file |