changeset 522 | d33698326409 |
parent 521 | 88a01948450d |
child 523 | 54bdda4aefa5 |
--- a/getting-started-files/quickref.tex Wed Nov 17 23:24:57 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -\textbf{Getting Started -- files} - -\lstinline|f = open('filename')| returns a file object. \lstinline|f| -can be used to perform further operations on the file. - -\lstinline|f.read()| reads the whole file and returns the contents. - -\lstinline|f.close()| closes the file. - -\lstinline|for line in open('filename'):| -- iterate over the file -line-by-line. -