Re: Embedding Python crash on PyTuple_New

2021-11-24 Thread MRAB
On 2021-11-24 07:59, Arnaud Loonstra wrote: On 24-11-2021 01:46, MRAB wrote: On 2021-11-23 20:25, Arnaud Loonstra wrote: On 23-11-2021 18:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnau

Re: Embedding Python crash on PyTuple_New

2021-11-24 Thread Arnaud Loonstra
On 24-11-2021 01:46, MRAB wrote: On 2021-11-23 20:25, Arnaud Loonstra wrote: On 23-11-2021 18:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread MRAB
On 2021-11-23 20:25, Arnaud Loonstra wrote: On 23-11-2021 18:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 18:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedd

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread MRAB
On 2021-11-23 17:31, MRAB wrote: On 2021-11-23 16:04, Arnaud Loonstra wrote: [snip] I would turn my attention to s_py_zosc function but I'm not sure. Since the errors are GC related it could caused anywhere? Basically, yes, but I won't be surprised if it was due to too few INCREFs or too man

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread MRAB
On 2021-11-23 16:04, Arnaud Loonstra wrote: On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up un

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 16:37, MRAB wrote: On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC rela

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread MRAB
On 2021-11-23 15:17, MRAB wrote: On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently tryin

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread MRAB
On 2021-11-23 14:44, Arnaud Loonstra wrote: On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understandi

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 15:34, MRAB wrote: On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here. I'm creating a

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread MRAB
On 2021-11-23 12:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here. I'm creating a Tuple in C but it crashes on crea

Re: Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
On 23-11-2021 13:07, Arnaud Loonstra wrote: Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here. I'm creating a Tuple in C but it crashes on c

Embedding Python crash on PyTuple_New

2021-11-23 Thread Arnaud Loonstra
Hi, I've got Python embedded successfully in a program up until now as I'm now running into weird GC related segfaults. I'm currently trying to debug this but my understanding of CPython limits me here. I'm creating a Tuple in C but it crashes on creating it after a while. It doesn't make se

Embedding Python (3.7) on OSX crash on Py_Initialize when run as bundle

2019-02-28 Thread Arnaud Loonstra
Hi, I'm trying to wrap my head around an OSX app which has python embedded. This works fine if I run the build on the same machine as it is build on. However when using Travis to build the app I can only get it to run from the terminal. A double click on the appdir (or using open) results in

Re: python crash on windows but not on linux

2010-02-15 Thread hjebbers
On 13 feb, 13:48, Dave Angel wrote: > hjebbers wrote: > > On Feb 13, 10:25 am, Dennis Lee Bieber wrote: > > >> On Fri, 12 Feb 2010 09:21:07 -0800 (PST), hjebbers > >> declaimed the following in gmane.comp.python.general: > > >>> What strikes me is: &

Re: python crash on windows but not on linux

2010-02-14 Thread Roel Schroeven
Op 2010-02-13 13:14, Alf P. Steinbach schreef: > * hjebbers: >> I enlarged the windows page file from 750Kb to 1.5Gb . >> The crash still happens. >> btw, the crash does not happen at a peak memory usage. >> According to windows task manager, at the moment of crash mem usage of >> my program is 669

Re: python crash on windows but not on linux

2010-02-13 Thread Dave Angel
hjebbers wrote: On Feb 13, 10:25 am, Dennis Lee Bieber wrote: On Fri, 12 Feb 2010 09:21:07 -0800 (PST), hjebbers declaimed the following in gmane.comp.python.general: What strikes me is: 1. the crash on windows, but linux works OK (same test sets) 2. the linux box has 750Mb RAM, the

Re: python crash on windows but not on linux

2010-02-13 Thread hjebbers
On Feb 13, 10:25 am, Dennis Lee Bieber wrote: > On Fri, 12 Feb 2010 09:21:07 -0800 (PST), hjebbers > declaimed the following in gmane.comp.python.general: > > > What strikes me is: > > 1. the crash on windows, but linux works OK (same test sets) > > 2. the linux box

Re: python crash on windows but not on linux

2010-02-13 Thread Alf P. Steinbach
* hjebbers: I enlarged the windows page file from 750Kb to 1.5Gb . The crash still happens. btw, the crash does not happen at a peak memory usage. According to windows task manager, at the moment of crash mem usage of my program is 669kb, peak memory usage is 1.136kb henk-jan Probably you mean

Re: python crash on windows but not on linux

2010-02-13 Thread hjebbers
n.general: > > >>> What strikes me is: > >>> 1. the crash on windows, but linux works OK (same test sets) > >>> 2. the linux box has 750Mb RAM, the windows box has 1.5Gb (twice as > >>> much). > > >>          Which on its own does no

Re: python crash on windows but not on linux

2010-02-13 Thread Diez B. Roggisch
Am 13.02.10 11:50, schrieb hjebbers: On Feb 13, 10:25 am, Dennis Lee Bieber wrote: On Fri, 12 Feb 2010 09:21:07 -0800 (PST), hjebbers declaimed the following in gmane.comp.python.general: What strikes me is: 1. the crash on windows, but linux works OK (same test sets) 2. the linux box has

Re: python crash on windows but not on linux

2010-02-13 Thread hjebbers
to all, thanks for the pointers so far. if you feel the need to reproduce the crash, it's not that hard, (downloading and installing my edi translator, install configuration (button-click), and run. I have a modified version (replace some *.py files) that eliminate a lot of stuff (simpler setup, n

Re: python crash on windows but not on linux

2010-02-13 Thread hjebbers
On Feb 13, 10:25 am, Dennis Lee Bieber wrote: > On Fri, 12 Feb 2010 09:21:07 -0800 (PST), hjebbers > declaimed the following in gmane.comp.python.general: > > > What strikes me is: > > 1. the crash on windows, but linux works OK (same test sets) > > 2. the linux box

Re: python crash on windows but not on linux

2010-02-13 Thread hjebbers
gt;> info? > > >> >> > Yes, a whole lot more; but I do not want to bother you with that > >> >> > now. I was just wondering if it is possible that the same setup > >> >> > gives a CRASH! on windows and just works on linux. > >> >&g

Re: python crash on windows but not on linux

2010-02-13 Thread hjebbers
On Feb 12, 11:46 pm, Rob Williscroft wrote: > hjebbers wrote in news:2864756a-292b-4138-abfd- > 3348b72b7...@u9g2000yqb.googlegroups.com in comp.lang.python: > > > the information about the error is a windows dump. > > This may help: > > #http://msdn.microsoft.com/en-us/library/ms680621(VS.85).asp

Re: python crash on windows but not on linux

2010-02-13 Thread Peter Otten
; >> The problem may be related to how you treat the EDI file or lets >> >> >> say DATA. Also your coding style is important. Can you provide more >> >> >> info? >> >> >> > Yes, a whole lot more; but I do not want to bother you with th

Re: python crash on windows but not on linux

2010-02-12 Thread Rob Williscroft
hjebbers wrote in news:2864756a-292b-4138-abfd- 3348b72b7...@u9g2000yqb.googlegroups.com in comp.lang.python: > the information about the error is a windows dump. This may help: # http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx SEM_FAILCRITICALERRORS = 1 SEM_NOALIGNMENTFAULTEXCEPT

Re: python crash on windows but not on linux

2010-02-12 Thread hjebbers
how you treat the EDI file or lets say > >> >> DATA. Also your coding style is important. Can you provide more info? > > >> > Yes, a whole lot more; but I do not want to bother you with that now. > >> > I was just wondering if it is possible that the same setup

Re: Re: python crash on windows but not on linux

2010-02-12 Thread Dave Angel
hjebbers wrote: On Feb 12, 2:06 pm, Dave Angel wrote: hjebbers wrote: On Feb 12, 3:41 am, a...@pythoncraft.com (Aahz) wrote: In article <34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, hjebbers wrote: the error is a windows thing, I can

Re: python crash on windows but not on linux

2010-02-12 Thread Bruno Desthuilliers
Peter Otten a écrit : (snip) Even on alt.haruspicy they cannot do much without a liver now and then... Muhahahahaha !-) +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: python crash on windows but not on linux

2010-02-12 Thread Peter Otten
mportant. Can you provide more info? >> >> > Yes, a whole lot more; but I do not want to bother you with that now. >> > I was just wondering if it is possible that the same setup gives a >> > CRASH! on windows and just works on linux. >> > (where is the bu

Re: python crash on windows but not on linux

2010-02-12 Thread Christian Heimes
hjebbers wrote: > The message on the screen is (I typed it over): > > ** > python.exe > > python.exe has encountered a problem and needs to close. > We are sorry for the inconvenience. > > If you were in the midd

Re: python crash on windows but not on linux

2010-02-12 Thread hjebbers
On Feb 12, 2:06 pm, Dave Angel wrote: > hjebbers wrote: > > On Feb 12, 3:41 am, a...@pythoncraft.com (Aahz) wrote: > > >> In article > >> <34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, > > >> hjebbers   wrote: > > >>> the error is a windows thing, I can make a screenshot of

Re: python crash on windows but not on linux

2010-02-12 Thread Steve Holden
Dave Angel wrote: > hjebbers wrote: >> On Feb 12, 3:41 am, a...@pythoncraft.com (Aahz) wrote: >> >>> In article >>> <34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, >>> >>> hjebbers wrote: >>> >>> the error is a windows thing, I can make a screenshot of it, but I ca

Re: python crash on windows but not on linux

2010-02-12 Thread Dave Angel
hjebbers wrote: On Feb 12, 3:41 am, a...@pythoncraft.com (Aahz) wrote: In article <34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, hjebbers wrote: the error is a windows thing, I can make a screenshot of it, but I can not copy/paste text. In that case, yo

Re: python crash on windows but not on linux

2010-02-12 Thread hjebbers
On Feb 12, 3:41 am, a...@pythoncraft.com (Aahz) wrote: > In article > <34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, > > hjebbers   wrote: > > >the error is a windows thing, I can make a screenshot of it, but I can > >not copy/paste text. > > In that case, you need to -- very

Re: python crash on windows but not on linux

2010-02-12 Thread Peter Otten
I was just wondering if it is possible that the same setup gives a > CRASH! on windows and just works on linux. > (where is the bug?) In the platform-specific code ;) Even on alt.haruspicy they cannot do much without a liver now and then... -- http://mail.python.org/mailman/listinfo/python-list

Re: python crash on windows but not on linux

2010-02-12 Thread hjebbers
ossible that the same setup gives a CRASH! on windows and just works on linux. (where is the bug?) kind regards, henk-jan -- http://mail.python.org/mailman/listinfo/python-list

Re: python crash on windows but not on linux

2010-02-11 Thread Terry Reedy
On 2/11/2010 9:41 PM, Aahz wrote: In article<34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, hjebbers wrote: the error is a windows thing, I can make a screenshot of it, but I can not copy/paste text. I think I know what box you mean. I believe this happened about 18 mo

Re: python crash on windows but not on linux

2010-02-11 Thread Aahz
In article <34fcf680-1aa4-4835-9eba-3db3249f3...@q16g2000yqq.googlegroups.com>, hjebbers wrote: > >the error is a windows thing, I can make a screenshot of it, but I can >not copy/paste text. In that case, you need to -- very carefully -- make sure you transcribe exactly the message that you see

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 11:56 pm, Carl Banks wrote: > On Feb 11, 2:39 pm, hjebbers wrote: > > > > > On Feb 11, 8:42 pm, Jerry Hill wrote: > > > > On Thu, Feb 11, 2010 at 9:32 AM, hjebbers wrote: > > > > To all, > > > > I am running an EDI translator, and doing stress tests. > > > > When processing a test wi

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 12, 12:13 am, Emile van Sebille wrote: > On 2/11/2010 6:32 AM hjebbers said... > > > To all, > > I am running an EDI translator, > > ... let's say bots  :) > > > and doing stress tests. > > When processing a test with a (relatively) big EDI file(s) on > > windowsXP  I get a crash: > >      

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 12, 12:13 am, Emile van Sebille wrote: > On 2/11/2010 6:32 AM hjebbers said... > > > To all, > > I am running an EDI translator, > > ... let's say bots  :) > > > and doing stress tests. > > When processing a test with a (relatively) big EDI file(s) on > > windowsXP  I get a crash: > >      

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 12, 12:13 am, Emile van Sebille wrote: > On 2/11/2010 6:32 AM hjebbers said... > > > To all, > > I am running an EDI translator, > > ... let's say bots  :) > > > and doing stress tests. > > When processing a test with a (relatively) big EDI file(s) on > > windowsXP  I get a crash: > >      

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 11:59 pm, Terry Reedy wrote: > On 2/11/2010 9:32 AM, hjebbers wrote: > > > > > To all, > > I am running an EDI translator, and doing stress tests. > > When processing a test with a (relatively) big EDI file(s) on > > windowsXP  I get a crash: > >      'sorry for the inconvenience' etc  

Re: python crash on windows but not on linux

2010-02-11 Thread Emile van Sebille
On 2/11/2010 6:32 AM hjebbers said... To all, I am running an EDI translator, ... let's say bots :) and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues about what is causing the p

Re: python crash on windows but not on linux

2010-02-11 Thread Terry Reedy
On 2/11/2010 9:32 AM, hjebbers wrote: To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues about what is causing the problem) This happens with

Re: python crash on windows but not on linux

2010-02-11 Thread Carl Banks
On Feb 11, 2:39 pm, hjebbers wrote: > On Feb 11, 8:42 pm, Jerry Hill wrote: > > > > > > > On Thu, Feb 11, 2010 at 9:32 AM, hjebbers wrote: > > > To all, > > > I am running an EDI translator, and doing stress tests. > > > When processing a test with a (relatively) big EDI file(s) on > > > windows

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 8:42 pm, Jerry Hill wrote: > On Thu, Feb 11, 2010 at 9:32 AM, hjebbers wrote: > > To all, > > I am running an EDI translator, and doing stress tests. > > When processing a test with a (relatively) big EDI file(s) on > > windowsXP  I get a crash: > >    'sorry for the inconvenience' etc

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
On Feb 11, 8:42 pm, Jerry Hill wrote: > On Thu, Feb 11, 2010 at 9:32 AM, hjebbers wrote: > > To all, > > I am running an EDI translator, and doing stress tests. > > When processing a test with a (relatively) big EDI file(s) on > > windowsXP  I get a crash: > >    'sorry for the inconvenience' etc

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
gt; > > Yes, a whole lot more; but I do not want to bother you with that now. > > I was just wondering if it is possible that the same setup gives a > > CRASH! on windows and just works on linux. > > (where is the bug?) > > In the platform-specific code ;) > > Even

Re: python crash on windows but not on linux

2010-02-11 Thread Jerry Hill
On Thu, Feb 11, 2010 at 9:32 AM, hjebbers wrote: > To all, > I am running an EDI translator, and doing stress tests. > When processing a test with a (relatively) big EDI file(s) on > windowsXP  I get a crash: >    'sorry for the inconvenience' etc  (so no clues about what is > causing the problem)

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
gt; > > Yes, a whole lot more; but I do not want to bother you with that now. > > I was just wondering if it is possible that the same setup gives a > > CRASH! on windows and just works on linux. > > (where is the bug?) > > In the platform-specific code ;) > > Even

Re: python crash on windows but not on linux

2010-02-11 Thread hjebbers
gt; > > Yes, a whole lot more; but I do not want to bother you with that now. > > I was just wondering if it is possible that the same setup gives a > > CRASH! on windows and just works on linux. > > (where is the bug?) > > In the platform-specific code ;) > > Even

python crash on windows but not on linux

2010-02-11 Thread hjebbers
To all, I am running an EDI translator, and doing stress tests. When processing a test with a (relatively) big EDI file(s) on windowsXP I get a crash: 'sorry for the inconvenience' etc (so no clues about what is causing the problem) This happens with python 2.4, 2.5, 2.6 It does not happen i

Re: Crash on msvcrt mismatch?

2009-04-10 Thread Aahz
In article , Lagarde, Jean wrote: > >I'm curious to understand why that matters, but I found out that if I load = >the modules in the inverse order, everything works fine. There's probably a refcount bug hiding in your code. -- Aahz (a...@pythoncraft.com) <*> http://www.pythonc

RE: Crash on msvcrt mismatch?

2009-04-10 Thread Lagarde, Jean
I'm curious to understand why that matters, but I found out that if I load the modules in the inverse order, everything works fine. -- Jean From: Lagarde, Jean Sent: Friday, April 10, 2009 10:08 AM To: python-list@python.org Subject: Crash on msvcrt mismatc

Crash on msvcrt mismatch?

2009-04-10 Thread Lagarde, Jean
I don't have much experience writing extension modules, and am looking for pointers to resolve python crashes on Windows. I've isolated the problem to a python file with the following two lines: import PyQt4.Qwt5 import C13 That causes Python to crash. If I comment out either one of t

Re: PyMarshal Commands crash on Windows

2008-09-14 Thread spammaster . 10 . webmaster
Hi! I shortened the quode. Everything should be all right and nothing is a NULL Pointer. What about PyMarshal_ReadObjectFromFile(FILE* p), this crashs too :-/ hm... the problem is, on mac everything is all right.. thanks... -- http://mail.python.org/mailman/listinfo/python-list

Re: PyMarshal Commands crash on Windows

2008-09-14 Thread Gabriel Genellina
En Sun, 14 Sep 2008 08:28:01 -0300, <[EMAIL PROTECTED]> escribió: int main (int argc, char * const argv[]) { Py_Initialize(); FILE* fp = fopen("/Users/test/Desktop/123.pyc","wb"); PyCodeObject* op = (PyCodeObject*)Py_CompileString("import sys \nprint 'hello'","",Py_file_input);

Re: PyMarshal Commands crash on Windows

2008-09-14 Thread spammaster . 10 . webmaster
Hi! Please remember, that the script crashs on Line PyMarshal_WriteObjectToFile. :-( -- http://mail.python.org/mailman/listinfo/python-list

PyMarshal Commands crash on Windows

2008-09-14 Thread spammaster . 10 . webmaster
Hi! Can anyone help me with this issue? int main (int argc, char * const argv[]) { Py_Initialize(); FILE* fp = fopen("/Users/test/Desktop/123.pyc","wb"); PyCodeObject* op = (PyCodeObject*)Py_CompileString("import sys \nprint 'hello'","",Py_file_input); PyMarshal_WriteObjectToFile

Another BeautifulSoup crash on bad HTML

2008-05-14 Thread John Nagle
Can't really blame BeautifulSoup for this, but our crawler hit a page ("http://clagnut.com/privacy/";) with an out of range character escape: 𔃷 in this text: If you provide a name, email address and/or website and choose ‘Remember me𔃷, these details will be stored as a cookie on y

Odd PyQt4 crash on exit when importing on windows

2008-04-06 Thread Chris Bergstresser
a problem and needs to close. We are sorry for the inconvenience." crash on Windows XP. Obviously, removing either of the import statements fixes the problem. I think I can disentangle my real code so the files don't import each other, but what's going on? Are other people

Crash on

2007-01-06 Thread John Pye
Hi all I have a unittest test suite that's testing a fairly large SWIG-wrapped application via Python. All my tests are passing at the moment, but when Python exits, I get the following (shown below). Could anyone please help me to understand what precisely this message means (other than that obv

Re: pyparsing: crash on empty element

2006-03-06 Thread Paul McGuire
To indicate that a particular parse expression may be empty, pyparsing includes the Optional element. Change: pp.delimitedList(withquotes | withoutquotes) + \ to: pp.Optional( pp.delimitedList(withquotes | withoutquotes) ) + \ and I think this will have the desired effect. -- Paul wrote in m

pyparsing: crash on empty element

2006-03-06 Thread gry
[python 2.3.3, pyparsing 1.3] I have: def unpack_sql_array(s): # unpack a postgres "array", e.g. "{'w1','w2','w3'}" into a list(str) import pyparsing as pp withquotes = pp.dblQuotedString.setParseAction(pp.removeQuotes) withoutquotes = pp.CharsNotIn('",{}') parser = pp.StringS