Re: Regular Expression in Python 2.0

2001-01-31 Thread Markus Schönhaber
> > re = pre # Avoids the need of changing existing code > > or that can be shortened to > > import pre as re Hey, learned something new! Thanks. Gruß Markus ___ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman

Re: Regular Expression in Python 2.0

2001-01-31 Thread Trent Mick
> #import re # comment out this line - new regexp (implicitly loads "sre" I > think) > import pre # the python 1.5 implementation of regexp > > re = pre # Avoids the need of changing existing code or that can be shortened to import pre as re Cheers, Trent -- Trent Mick [EMAIL PROTECTED

Re: Regular Expression in Python 2.0

2001-01-31 Thread Markus Schönhaber
> Python 2.0: > When I use regular expression with rather big file (150,000 byte), I > get error: "RuntimeError: maximum recursion limit exceeded" > > But on Pytnon 1.52 in the same situation it's OK. Maybe you are using non-greedy regexps - i. e. something like 'a*?'. It is a known bug that they

RE: Regular Expression in Python 2.0

2001-01-31 Thread Houman G
> On Wed, Jan 31, 2001 at 12:57:26PM +0300, Karpov Denis > Sergeevic wrote: > > Python 2.0: > > When I use regular expression with rather big file (150,000 byte), I > > get error: "RuntimeError: maximum recursion limit exceeded" > > > > But on Pytnon 1.52 in the same situation it's OK. > > > > May

RE: Antwort: ActivePython digest, Vol 1 #72 - 4 msgs

2001-01-31 Thread Noah
Yes, you use a different 'open' mode. See this documentation: http://www.python.org/doc/current/lib/built-in-funcs.html#l2h-179 Instead of: outfile = open ('foo', 'w') you want to use: outfile = open ('foo', 'a') or: outfile = open ('foo', 'ab') That's 'a' for 'ap

Re: Regular Expression in Python 2.0

2001-01-31 Thread Trent Mick
On Wed, Jan 31, 2001 at 12:57:26PM +0300, Karpov Denis Sergeevic wrote: > Python 2.0: > When I use regular expression with rather big file (150,000 byte), I > get error: "RuntimeError: maximum recursion limit exceeded" > > But on Pytnon 1.52 in the same situation it's OK. > > Maybe because stack

Re: Antwort: ActivePython digest, Vol 1 #72 - 4 msgs

2001-01-31 Thread Phil Harris
The Python documentation has the info you need, section 2, builtin functions under 'open'. Please rtfm. On Wed, 31 Jan 2001 13:54:20 +, I seem to recall, [EMAIL PROTECTED] <[EMAIL PROTECTED]> scrawled something like: > > Hi! > > Are there any "write append" methods for file objects in

Antwort: ActivePython digest, Vol 1 #72 - 4 msgs

2001-01-31 Thread Sharriff . Aina
Hi! Are there any "write append" methods for file objects in Python? I can´t imagine that one one have to read and store the file contents in a container on to add to the container and RE-write to the original file Best regards Sharriff Aina

Re: Regular Expression in Python 2.0

2001-01-31 Thread Phil Harris
Ooops, change stackless.org to stackless.com in my last message. On Wed, 31 Jan 2001 12:57:26 +0300, I seem to recall, ëÁÒÐÏ× <ëÁÒÐÏ× äÅÎÉÓ óÅÒÇÅÅ×ÉÞ <[EMAIL PROTECTED]>> scrawled something like: > Python 2.0: > When I use regular expression with rather big file (150,000 byte), I > get error: "

Re: Regular Expression in Python 2.0

2001-01-31 Thread Phil Harris
Dennis, Did you change your py152 to use the stackless variant of the executable? http://www.stackless.org You can also get a stackless version of py20, that may help. Phil On Wed, 31 Jan 2001 12:57:26 +0300, I seem to recall, ëÁÒÐÏ× <ëÁÒÐÏ× äÅÎÉÓ óÅÒÇÅÅ×ÉÞ <[EMAIL PROTECTED]>> scrawled som

Regular Expression in Python 2.0

2001-01-31 Thread Карпов Денис Сергеевич
Python 2.0: When I use regular expression with rather big file (150,000 byte), I get error: "RuntimeError: maximum recursion limit exceeded" But on Pytnon 1.52 in the same situation it's OK. Maybe because stack size. Is it fatal? Can I do something with it? With hope, Denis. ___