Re: Re: Question about math.pi is mutable

2015-11-09 Thread wa...@travelsky.com
Hi, Chris Angelico , Thank you for your help ! :-) From: Chris Angelico Date: 2015-11-06 18:30 To: wa...@travelsky.com CC: python-list Subject: Re: Question about math.pi is mutable On Fri, Nov 6, 2015 at 1:33 PM, wa...@travelsky.com wrote: > Hello, python-list guys: > > I am a newbie

Re: RE Question

2009-08-03 Thread Victor Subervi
That worked. Thank you again :) Victor On Mon, Aug 3, 2009 at 12:13 AM, Gabriel Genellina wrote: > En Sun, 02 Aug 2009 18:22:20 -0300, Victor Subervi < > victorsube...@gmail.com> escribió: > > > How do I search and replace something like this: >> aLine = re.sub('[<]?[p]?[>]?> a-zA-Z0-9"\'=:]*>[<

Re: RE Question

2009-08-03 Thread Gabriel Genellina
En Sun, 02 Aug 2009 18:22:20 -0300, Victor Subervi escribió: How do I search and replace something like this: aLine = re.sub('[<]?[p]?[>]?[<]?[b]?[>]?', '', aLine) where RE *only* looks for the possibility of "" at the beginning of the string; that is, not the individual components as I hav

Re: RE Question

2009-08-03 Thread tiefeng wu
2009/8/3 Victor Subervi : -> Hi; -> How do I search and replace something like this: > aLine = re.sub('[<]?[p]?[>]? a-zA-Z0-9"\'=:]*>[<]?[b]?[>]?', '', aLine) > where RE *only* looks for the possibility of "" at the beginning of the > string; that is, not the individual components as I have it code

Re: Re: question of style

2009-07-04 Thread Dave Angel
upwestdon wrote: On Jul 2, 1:23 pm, Simon Forman wrote: Hey I was hoping to get your opinions on a sort of minor stylistic point. These two snippets of code are functionally identical. Which would you use and why? The first one is easier [for me anyway] to read and understand, but slightly l

Re: re: question

2008-07-20 Thread Marc 'BlackJack' Rintsch
On Sun, 20 Jul 2008 18:39:52 +0100, Perl_Wizard wrote: > Nobody any sensible answers. Too complicated I suppose! I've often been asked that, i'd be able to buy me a mars bar! Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: re question

2008-02-08 Thread Hyuga
On Feb 7, 1:47 pm, Amit Gupta <[EMAIL PROTECTED]> wrote: > On Feb 7, 10:38 am, Amit Gupta <[EMAIL PROTECTED]> wrote: > > > > > Python'ites > > > I searched around "google" to find the answer to this question, but I > > can't: > > > I have a named regexp : x = re.compile("(?P[a-z]+)") > > > What I w

Re: re question

2008-02-07 Thread Amit Gupta
On Feb 7, 10:38 am, Amit Gupta <[EMAIL PROTECTED]> wrote: > Python'ites > > I searched around "google" to find the answer to this question, but I > can't: > > I have a named regexp : x = re.compile("(?P[a-z]+)") > > What I want is an iterator, that can return me both the "groupname" > and the match

Re: re question

2007-09-20 Thread Dan Bar Dov
On 9/20/07, Matt McCredie <[EMAIL PROTECTED]> wrote: > > > > Any common knowledge IP matching RE? > > I don't know if there is any common knowledge RE, but I came up with > the following: > > > r"((1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.){3}(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)") Thank you. I will u

Re: re question

2007-09-20 Thread Matt McCredie
On 9/20/07, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Dan Bar Dov wrote: > > I'm trying to construct a regular expression to match valid IP address, > > without leading zeroes (i.e > > 1.2.3.4 , 254.10.0.0 , but not > > 324.1.1.1, nor 010.10.10.1

Re: re question

2007-09-20 Thread Ricardo Aráoz
Dan Bar Dov wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4 , 254.10.0.0 , but not > 324.1.1.1, nor 010.10.10.1 ) > > This is what I come up with, and it does not work. >

Re: re question

2007-09-20 Thread David
On 9/19/07, Dan Bar Dov <[EMAIL PROTECTED]> wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4, 254.10.0.0, but not 324.1.1.1, nor 010.10.10.1) > > This is what I come up with, and it does not work. > > r'(^[12]?\d{0,2}\.){3,3}[1

Re: re question

2007-09-20 Thread Matt McCredie
On 9/19/07, Dan Bar Dov <[EMAIL PROTECTED]> wrote: > I'm trying to construct a regular expression to match valid IP address, > without leading zeroes (i.e > 1.2.3.4, 254.10.0.0, but not 324.1.1.1, nor 010.10.10.1) > > This is what I come up with, and it does not work. > > r'(^[12]?\d{0,2}\.){3,3}[1

Re: re question

2006-11-01 Thread attn . steven . kuo
Schüle Daniel wrote: (snipped) > I am trying to construct a case where a greedy and > non greedy operation produce different result. > I dont see the difference between 'a??b' and 'a?b' > As far I understand is that ? will first try to match a > (it's greedy) and only if it fails then it step bac

Re: re question

2006-11-01 Thread Steve Holden
Schüle Daniel wrote: > Hello all, > > I didn't found more appropriate news group for > this question, please let me know if there is ng with > regular expression as its main topic > > I am trying to construct a case where a greedy and > non greedy operation produce different result. > I dont see

Re: re question

2006-07-10 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Schüle Daniel <[EMAIL PROTECTED]> wrote: >Hello, > >consider the following code > > >>> re.search("[a-z](?i)[a-z]","AA") ><_sre.SRE_Match object at 0x40177e20> > >this gives a match >if we provide an extra group for the first character it still works > > >>> re.sear

Re: re question

2006-06-23 Thread Daniel Sch
"Paul McGuire" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Shouldn't > > End Package Test; > > read: > > End Package Test123; > > > -- Paul yes it must :) my mistake thx -- http://mail.python.org/mailman/listinfo/python-list

Re: re question

2006-06-23 Thread Paul McGuire
Shouldn't End Package Test; read: End Package Test123; -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: re question

2006-06-23 Thread Daniel Sch
Hi [...] hm, that's wired I just tried it in python shell and it works but same code as script file fails for anyone who want to see for himself # package.vhd file bash % cat package.vhd library ieee; use ieee.std_logic_1164.all; package TEST123 is constant BASE End Package Test; #

Re: re question

2006-06-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Daniel Schüle wrote: > this is the pattern > > pattern = > re.compile(r'^\s*package\s+(?P\w+)\s+is\s+(?P.*?)\s+end(\s+package)?(\s+(?P=name))?\s*;', > > re.DOTALL | re.MULTILINE | re.IGNORECASE) > > and the problem is that > package TEST is xyz end; > works but >

Re: RE Question

2005-08-18 Thread Yoav
What is the difference between the RE module and the SRE one? Original Message From: Jorge Godoy <[EMAIL PROTECTED]> To: Subject: Re:RE Question Date: 18/8/2005 17:44 > Yoav wrote: > > >>I don't understand why the two REs produce a different result. I read >>the RE guide but s

Re: RE Question

2005-08-18 Thread Yoav
Thanks, it seems like the first answer covers the second as well. Thank you. Jorge Godoy wrote: > Yoav wrote: > > >>I don't understand why the two REs produce a different result. I read >>the RE guide but still I can't seem to figure it out. >> >> >>> t >>'echo user=name password=pass path="/re

Re: RE Question

2005-08-18 Thread Jorge Godoy
Yoav wrote: > I don't understand why the two REs produce a different result. I read > the RE guide but still I can't seem to figure it out. > > >>> t > 'echo user=name password=pass path="/ret files"\r\n' > >>> re.findall(r'(?<=\s)[^=]+=((?:".*")|(?:\S*))(?=\s)', t) > ['name', 'pass', '"/ret fi

Re: re - Question about pyFMOD importing

2005-03-07 Thread Heiko Wundram
On Tuesday 08 March 2005 12:38, lior botzer wrote: > Were you able to hack this one ? I haven't seen this error in a long time (as I'm no Windows user for a long time), but from what I gather the only thing that the specified error was telling you is the fact that the dynamic linking library tha