Checking if a text file is blank

David wizzardx at gmail.com
Sun Apr 20 09:09:52 CEST 2008


>
>  import os
>  print os.lstat("friends.txt")[6]
>

I prefer os.lstat("friends.txt").st_size



More information about the Python-list mailing list