what are the uses of file object in python