simple print is not working..

lahirister at gmail.com lahirister at gmail.com
Wed May 24 21:44:41 CEST 2006


lahiris... at gmail.com wrote:

Sorry typo: Script is like this:

#!/usr/bin/python
fsfile = open('/tmp/fs_info.al', 'r')
for line in fsfile.readlines():
print line
fsfile.close()

*not* fsfiles as I typed in original post.

> What is wrong with this script?
>
> #!/usr/bin/python
> fsfile = open('/tmp/fs_info.al', 'r')
> for line in fsfiles.readlines():
> print line
> fsfile.close()
>
>
> #./get_fs_info.py
>   File "./get_fs_info.py", line 4
>     print line
>         ^
> SyntaxError: invalid syntax
> 
> 
> Any ideas?
> 
> Thanks
> AL




More information about the Python-list mailing list