# 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 :