![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/10/2013, 12:07
|
![Avatar de razpeitia](http://static.forosdelweb.com/customavatars/avatar93893_5.gif) | Moderador | | Fecha de Ingreso: marzo-2005 Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 10 meses Puntos: 1360 | |
Respuesta: truncar archivo en python Basado en esta respuesta.
Código Python:
Ver originalwith open(filename, "wb") as f: f.seek(999) f.write("\0") f.seek(0) f.write("Some stuff")
|