Python is an interpreted language so it execute the code line by line so when I am running
import csv,re,sys
print len(sys.argv)
if(len(sys.argv)!=2):
sys.exit(0)
filename= #from command line argument
it doesn't execute even a single line and give syntax error.
Now my question is that last line of the code has error but python interpreter execute the code line by line so the code up to the last line is correct so it should execute the code upto the last line but it is giving me the below error and not printing length of sys.argv that I have defined in line 2
File "trace-analysis.py", line 45
filename = # from command line argument
SyntaxError: invalid syntax
I am not getting this behaviour.... please someone explain this ...