How to call a file

2008-05-09 Thread Chris Sprinkles
I'm still having trouble with calling a text file and I know its so simple here is the code work = open('C:\Documents and Settings\Administrator\My Documents\Chris\Python\Python\work.txt', 'r') for line in work.txt: print line ---

how to call a text file

2008-05-09 Thread Chris Sprinkles
I need to know how to call a text file called txt_file.do I just put the directory that it is in like C:\documnet\blah\blah ??? cars_file = open() # i will be our line counter so we know when to pause i = 0 print for line in cars_file: i = i + 1 # increment i by 1 at each line prin