The file Object Attributes
Categories: Python
Once a file is opened and you have one file object, you can get various information related to that file.
Here is a list of all attributes related to file object −
Sr.No.Attribute & Description
1. file.closed - Returns true if file is closed, false otherwise.
2. file.mode - Returns access mode with which file was opened.
3. file.name - Returns name of the file.
4. file.softspace - Returns false if space explicitly required with print, true otherwise.