Working with File Objects : File Object : File : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  File   » [  File Object  ]  Screenshots 
 



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 examples in the same category








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.