Working with File Objects : File Object : File PYTHON examples


PYTHON examples » File » File Object »

 

Working with File Objects



# Python has a built-in function, open, for opening a file on disk. 
# open returns a file object, which has methods and attributes for getting 
# information about and manipulating the opened file.

f = open("aFile.txt""rb")        

print f                                            

print f.mode                                       

print f.name                                       
           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo File
» File Object