Checking if a text file is blank

David wizzardx at gmail.com
Sun Apr 20 03:09:52 EDT 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