Re: RE Help splitting CVS data

2013-01-21 Thread Neil Cerutti
On 2013-01-21, Garry wrote: > Thanks everyone for your comments. I'm new to Python, but can > get around in Perl and regular expressions. I sure was taking > the long way trying to get the cvs data parsed. > > Sure hope to teach myself python. Maybe I need to look into > courses offered at th

Re: RE Help splitting CVS data

2013-01-21 Thread Alister
On Sun, 20 Jan 2013 16:41:12 -0800, Garry wrote: > On Sunday, January 20, 2013 3:04:39 PM UTC-7, Garry wrote: >> I'm trying to manipulate family tree data using Python. >> >> I'm using linux and Python 2.7.3 and have data files saved as Linux >> formatted cvs files >> >> The data appears in this

Re: RE Help splitting CVS data

2013-01-20 Thread Chris Angelico
On Mon, Jan 21, 2013 at 11:41 AM, Garry wrote: > Thanks everyone for your comments. I'm new to Python, but can get around in > Perl and regular expressions. I sure was taking the long way trying to get > the cvs data parsed. As has been hinted by Tim, you're actually talking about csv data -

Re: RE Help splitting CVS data

2013-01-20 Thread Garry
On Sunday, January 20, 2013 3:04:39 PM UTC-7, Garry wrote: > I'm trying to manipulate family tree data using Python. > > I'm using linux and Python 2.7.3 and have data files saved as Linux formatted > cvs files > > The data appears in this format: > > > > Marriage,Husband,Wife,Date,Place,Sour

Re: RE Help splitting CVS data

2013-01-20 Thread Tim Chase
On 01/20/13 16:16, Terry Reedy wrote: On 1/20/2013 5:04 PM, Garry wrote: I'm trying to manipulate family tree data using Python. I'm using linux and Python 2.7.3 and have data files saved as Linux formatted cvs files ... I'm stuck, comments and solutions greatly appreciated. Why are you not

Re: RE Help splitting CVS data

2013-01-20 Thread Terry Reedy
On 1/20/2013 5:04 PM, Garry wrote: I'm trying to manipulate family tree data using Python. I'm using linux and Python 2.7.3 and have data files saved as Linux formatted cvs files ... I'm stuck, comments and solutions greatly appreciated. Why are you not using the cvs module? -- Terry Jan Re

Re: RE Help splitting CVS data

2013-01-20 Thread Mitya Sirenef
On 01/20/2013 05:04 PM, Garry wrote: I'm trying to manipulate family tree data using Python. I'm using linux and Python 2.7.3 and have data files saved as Linux formatted cvs files The data appears in this format: Marriage,Husband,Wife,Date,Place,Source,Note0x0a Note: the Source field or the No

Re: Re: Help understanding the decisions *behind* python? - immutable objects

2009-07-27 Thread Dave Angel
Benjamin Kaplan wrote: On Sun, Jul 26, 2009 at 2:24 PM, John Nagle wrote: Beni Cherniavsky wrote: On Jul 22, 9:36 am, Hendrik van Rooyen wrote: On Tuesday 21 July 2009 15:49:59 Inky 788 wrote: problem. An interesting issue is Python objects, which are always mutabl

Re: Re: Help: Group based synchronize decorator

2009-06-21 Thread Vishal Shetye
Thanks. - vishal > -Original Message- > Sent: Friday, June 19, 2009 3:15 PM > To: python-list@python.org > Subject: Python-list Digest, Vol 69, Issue 214 > > Message: 6 > Date: Fri, 19 Jun 2009 10:53:27 +0200 > From: Piet van Oostrum > To: python-list@python.org > Subject: Re: Help: Grou

Re: RE Help

2007-09-21 Thread J. Cliff Dyer
Thomas Jollans wrote: > On Friday 21 September 2007, [EMAIL PROTECTED] wrote: > >> Not specific to Python, but it will be implemented in it... how do I >> compile a RE to catch everything between two know values? Here's what >> I've tried (but failed) to accomplish... the knowns here are START a

Re: RE Help

2007-09-21 Thread chris . monsanto
On Sep 21, 4:09 pm, Thomas Jollans <[EMAIL PROTECTED]> wrote: > On Friday 21 September 2007, [EMAIL PROTECTED] wrote: > > > Not specific to Python, but it will be implemented in it... how do I > > compile a RE to catch everything between two know values? Here's what > > I've tried (but failed) to a

Re: RE Help

2007-09-21 Thread Thomas Jollans
On Friday 21 September 2007, [EMAIL PROTECTED] wrote: > Not specific to Python, but it will be implemented in it... how do I > compile a RE to catch everything between two know values? Here's what > I've tried (but failed) to accomplish... the knowns here are START and > END: > > data = "asdfasgSTA

Re: RE Help

2007-09-21 Thread chris . monsanto
On Sep 21, 3:32 pm, [EMAIL PROTECTED] wrote: > > You'll want to use a non-greedy match: > > x = re.compile(r"START(.*?)END", re.DOTALL) > > Otherwise the . will match END as well. > > On Sep 21, 3:23 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > > > Only if there's a later END in the string, in whi

Re: RE Help

2007-09-21 Thread J. Clifford Dyer
On Fri, Sep 21, 2007 at 12:05:51PM -0700, [EMAIL PROTECTED] wrote regarding Re: RE Help: > > > > > x = re.compile('START(.*)END', re.DOTALL) > > You'll want to use a non-greedy match: > > x = re.compile(r"START(.*?)END", re.DOTALL) > >

Re: RE Help

2007-09-21 Thread byte8bits
> You'll want to use a non-greedy match: > x = re.compile(r"START(.*?)END", re.DOTALL) > Otherwise the . will match END as well. On Sep 21, 3:23 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Only if there's a later END in the string, in which case the user's > requirements will determine whether

Re: RE Help

2007-09-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Sep 21, 2:44 pm, David <[EMAIL PROTECTED]> wrote: >>> data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg" >>> x = re.compile('START.END', re.DOTALL) >> This should work: >> >> x = re.compile('START(.*)END', re.DOTALL) > > You'll want to use a non-greedy match: > >

Re: RE Help

2007-09-21 Thread chris . monsanto
On Sep 21, 2:44 pm, David <[EMAIL PROTECTED]> wrote: > > data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg" > > x = re.compile('START.END', re.DOTALL) > > This should work: > > x = re.compile('START(.*)END', re.DOTALL) You'll want to use a non-greedy match: x = re.compile(r"START(.*?)END", re.

Re: RE Help

2007-09-21 Thread David
> data = "asdfasgSTARTpruyerfghdfjENDhfawrgbqfgsfgsdfg" > x = re.compile('START.END', re.DOTALL) This should work: x = re.compile('START(.*)END', re.DOTALL) -- http://mail.python.org/mailman/listinfo/python-list