[pyar] [Aporte] Para los que estan escribiendo proyectos.

Joaquin Sorianello soriasoft en gmail.com
Jue Oct 21 17:44:49 ART 2010


2010/10/21 Juan Carlos Ojeda <juancarlospaco en gmail.com>:
> http://python.org.ar/pyar/Recetario/CerrarCorrectamenteTuPrograma
> Mirando el codigo del Ninja por que tube que editar una linea para
> que arranque note que no tiene esta caracteristica, pequeña pero grande.
> Busquen la documentacion del kernel y del filesystem ante cualquier duda.
> Saludos...
>
> --
> .
>
> _______________________________________________
> pyar mailing list pyar en python.org.ar
> http://listas.python.org.ar/listinfo/pyar
>
> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>


Perdon, pero no es mejor usar:

os.fsync(fd)

    Force write of file with filedescriptor fd to disk. On Unix, this
calls the native fsync() function; on Windows, the MS _commit()
function.

    If you’re starting with a Python file object f, first do
f.flush(), and then do os.fsync(f.fileno()), to ensure that all
internal buffers associated with f are written to disk.

    Availability: Unix, and Windows starting in 2.2.3.

(Extracto de http://docs.python.org/library/os.html )

lo de usar sync puede llegar a ser desastroso!
-- 
Joaquín Sorianello

Sea libre, use software libre



More information about the pyar mailing list