tags:

views:

44

answers:

3

Hi Guys

Can you look at this code? http://pastebin.com/0Vn88te1

C:>scalp-0.4.py

File "scalp-0.4.py", line 333 log_file = stream.readlines() ^ SyntaxError: invalid syntax

I cannot run it. Thanks for yourhelp.

+1  A: 
    try:
        stream = open(access,'r')
            log_file = stream.readlines()                  
    except IOError:

That line should not be indented in. Indentation is meaningful in Python. Delete four spaces and you'll be good.

    try:
        stream = open(access,'r')
        log_file = stream.readlines()                  
    except IOError:
John Kugelman
+2  A: 

You have extra indentation in that line

stream = open(access,'r')
---->log_file = stream.readlines()    

It should be like this

stream = open(access,'r')
log_file = stream.readlines()    
S.Mark
A: 

Do you really need that extra bit of indentation for that line? Same for the except: block that immediately follows the line under question. Look at line #336 as well.

vpit3833