Re: question

2007-08-19 Thread CarpeSkium
On Aug 17, 2:34 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > "I've parsed a webpage into a text file. In doing so, I've kept all > > the text I'm interested in, and removed all the text I don't want. My > > result is a text file that iscomma-separated. However, the tex

question

2007-08-17 Thread CarpeSkium
"I've parsed a webpage into a text file. In doing so, I've kept all the text I'm interested in, and removed all the text I don't want. My result is a text file that is comma-separated. However, the text file is one, very long, single string. I need to substitute every eighth (8th) comma with a new

Use variable in regular expression

2007-08-02 Thread CarpeSkium
I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. I am using yesterday's date to find all of my data from yesterday. Yesterday's date is 20070731, and assigned to the variable "yesterday_date". I want to loop thru a dir

Getting values out of a CSV

2007-07-12 Thread CarpeSkium
How do I access the value in the second row in the first position of a CSV? Or the 3rd row, in the fifth position? a,b,c,d,e,f,g,h,i j,k,l,m,n,o,p,q,r r,s,t,v,w,x,y,z I'd want to get at "j" and "w". I know I can do import csv reader = csv.reader(open("some.csv", "rb")) for row in reader: print r