From 1aba557893f6005a5f0cbfc497cd423ac1c6315d Mon Sep 17 00:00:00 2001 From: Yader Velásquez Date: Sun, 29 Aug 2010 22:38:01 +0000 Subject: it works for saving activities --- (limited to 'archivo.py') diff --git a/archivo.py b/archivo.py index 9d89e81..b200fce 100644 --- a/archivo.py +++ b/archivo.py @@ -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() -- cgit v0.9.1