[EMAIL PROTECTED] wrote: > Files aren't lists and thus don't have the functions for iteration. > > Try: > > def go(): > for line in open("bobo.txt", "r").readlines(): > print line > > go()
For example, you can do even this: import sys for line in sys.stdin: print line, python FileReader.py < bobo.tx 'import site' failed; use -v for traceback boris ozegovic vedran ozegovic -- "A mi smo stranci u vlastitoj zemlji zbog ljudskog sljama, lipa nasa silovana" -- http://mail.python.org/mailman/listinfo/python-list