Checking if a text file is blank

Andrew Lee fiacre.patrick at gmail.com
Mon Apr 21 05:21:20 CEST 2008


David wrote:
>>  import os
>>  print os.lstat("friends.txt")[6]
>>
> 
> I prefer os.lstat("friends.txt").st_size

MUCH easier to remember!!!!

Thanks!



More information about the Python-list mailing list