>>> import os >>> os.stat("file").st_size == 0 True 

Read more of this post