ok so I decided to learn python (perl, c, c++, java, objective-c, ruby and a bit of erlang and scala under my belt). and I keep on getting the following error when I try executing this:
Tue Jul 21{stevenhirsch@steven-hirschs-macbook-pro-2}/projects/python:-->./apache_logs.py
File "./apache_logs.py", line 17
print __doc__
^
SyntaxError: invalid syntax
#!/usr/local/bin/python
"""
USAGE:
apache_logs.py
"""
import sys
import os
if __name__ == "__main__":
if not len(sys.argv) > 1:
print __doc__
sys.exit(1)
infile_name = sys.argv[1]
I know it must be something really stupid but I've googled and read the documentation without finding anything. The docs all seem to state that what I've coded should work.
Many thanks in advance for your help!!