On 24-May-06, at 3:41 PM, [EMAIL PROTECTED] wrote:
> 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
>
[EMAIL PROTECTED] wrote:
> 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()
>
>
>
Did you cut and paste that code? I see a couple typos
First, on the line
for line in fsfiles.readline
[EMAIL PROTECTED] 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/f
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
--
http://mail.pyt