import os fd = os.open( "test", os.O_RDWR|os.O_CREAT ) os.write(fd, "\x1A") fstats = os.fstat( fd ) os.close( fd ) print "Create: ",fstats.st_size fd2 = os.open( "test", os.O_RDWR|os.O_CREAT ) fstats2 = os.fstat( fd2 ) os.close( fd2 ) print "Reopen: ",fstats2.st_size