def sameopenfile(fp1, fp2):
 s1 = os.fstat(fp1)
 s2 = os.fstat(fp2)
 return samestat(s1, s2)

def sameopenfile ( fp1 , fp2 ) : s1 = os . fstat ( fp1 ) s2 = os . fstat ( fp2 ) return samestat ( s1 , s2 )
test whether two open file objects reference the same file .