diff options
author | Yader Velásquez <yajosev@gmail.com> | 2010-08-29 22:38:01 (GMT) |
---|---|---|
committer | Yader Velásquez <yajosev@gmail.com> | 2010-08-29 22:38:01 (GMT) |
commit | 1aba557893f6005a5f0cbfc497cd423ac1c6315d (patch) | |
tree | f855de67d24aed3d2bcaa6b30ade3684cbb3f484 /archivo.py | |
parent | 6e85f242904e121d08d6b00d7bbbe31587fc861b (diff) |
it works for saving activities
Diffstat (limited to 'archivo.py')
-rw-r--r-- | archivo.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -34,12 +34,14 @@ def abrir_efemeride(): texto = pickle.load(archivo) return texto -def guardar_dato(indice, contenido, archivo): +def guardar_dato(indice, contenido): '''get a id dependig of the unix time, and the content''' indice = str(indice) - dict = {} - dict[indice] = contenido - f = open(archivo, 'w') - pickle.dump(dict, f) + dia = {} + activ = [] + activ.append(contenido) + dia[indice] = activ + f = open('files/actividades.pkl', 'w') + pickle.dump(dia, f) f.close() |