Originally posted by ghostdog74
1) created a file new.py
2) Wrote the following code:
Code:
import os import sys import csv def main(argv): choice = sys.argv[1] fp = open("c:\pst\pst_modified\log_4_0.csv",'r') for line in fp: line = line.strip().split() if choice == line[0]: print line[1:][0].split(";")
4) opened the command prompt
5)Moved to the directory where new.py is placed
6)executed the following command
python new.py '23'
whr am i wrong??
./new.py flasgged an error tht "." is not a valid command.
Comment