Re: python to parse excel file csv format

2008-12-04 Thread Jay Jesus Amorin
This is what i have done and its giving me error. #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, rb), delimiter=',', quoting=csv.QUOTE_NONE) try: #for row in reader: for fmodes,fname in reader: os.chmod(fname,fmodes) except

Re: python to parse excel file csv format

2008-12-04 Thread MRAB
Jay Jesus Amorin wrote: This is what i have done and its giving me error. #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, rb), delimiter=',', quoting=csv.QUOTE_NONE) try: #for row in reader: for fmodes,fname in reader: fmodes

python to parse excel file csv format

2008-12-03 Thread Jay Jesus Amorin
Hi all, Can anyone please help me. i need to parse the content of my csv excel file and run the unix command chown. test.csv: /dev/trunk/admin/sql/ADBPOS_CMSI_NATIONALITY.syn,814 /dev/trunk/bin/ADBPOSCMSDICED.ctl,405 /dev/trunk/discoverer/ADBPOS_BUSINESS_AREA.eex,215 Please help me parse the

Re: python to parse excel file csv format

2008-12-03 Thread Jay Jesus Amorin
This is how i do it, but it runs with error. Kindly help #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, rb), delimiter=',', quoting=csv.QUOTE_NONE) try: for row in reader: os.popen(chown row[0] row[1]) except

Re: python to parse excel file csv format

2008-12-03 Thread MRAB
Jay Jesus Amorin wrote: This is how i do it, but it runs with error. Kindly help #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, rb), delimiter=',', quoting=csv.QUOTE_NONE) try: for row in reader: os.popen(chown

Re: python to parse excel file csv format

2008-12-03 Thread Tino Wildenhain
MRAB wrote: Jay Jesus Amorin wrote: This is how i do it, but it runs with error. Kindly help #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, rb), delimiter=',', quoting=csv.QUOTE_NONE) try: for row in reader: