> > 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
> #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
> 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
> 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
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
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
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
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
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: "
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
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.
___
11 matches
Mail list logo