Si te refieres al archivo.json entero, es muy simple, una función en
os.path que te lo hace ;)

import os

os.path.getsize('/DIRECTORIO/ARCHIVO.json')

Ahora, el problema es que devuelve lo que pesa el archivo en bytes, solo
hay que dividir un par de veces en 1024 ;), espero que sirva.


El 9 de octubre de 2013 20:18, DiegoUG <diego.uribe.ga...@gmail.com>escribió:

> necesito saber cual es el size o el peso en megabits de una lista {} hecha
> en JSON
>
> como puedo hacer esto usando python?
>
> --
>   *Diego Alonso Uribe Gamez*
> ------------------------------
>
> *Desarrollador web*
>
> Twitter: @DiegoUG <http://www.twitter.com/DiegoUG>
>
> Google+: http://gplus.to/diegoug
> ------------------------------
>
>
> _______________________________________________
> Python-es mailing list
> Python-es@python.org
> https://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>
_______________________________________________
Python-es mailing list
Python-es@python.org
https://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a